mirror of
https://github.com/fergalmoran/StegoPrint.git
synced 2025-12-22 09:49:07 +00:00
25 lines
866 B
C#
25 lines
866 B
C#
using Microsoft.Extensions.CommandLineUtils;
|
|
using System;
|
|
|
|
namespace StegoPrint {
|
|
public class ExtractFingerprintCommand : CommandLineApplication {
|
|
CommandOption _keyfile;
|
|
CommandOption _input;
|
|
public ExtractFingerprintCommand() {
|
|
Name = "extract";
|
|
Description = "Extracts a fingerprint from a file";
|
|
|
|
_keyfile = Option("-$|-k |--keyfile <keyfile>", "The keyfile for the fingerprint", CommandOptionType.SingleValue);
|
|
_input = Option("-$|-i |--input <input>", "The input audio file to process", CommandOptionType.SingleValue);
|
|
|
|
HelpOption("-h | -? | --help");
|
|
OnExecute((Func<int>)RunCommand);
|
|
}
|
|
|
|
private int RunCommand() {
|
|
new Fingerprinter().ExtractMessage(_keyfile.Value(), _input.Value());
|
|
return -1;
|
|
}
|
|
}
|
|
}
|