Tidied up YARA operation

This commit is contained in:
n1474335 2019-01-18 15:34:56 +00:00
parent 4cabb849f3
commit ba04cac7ac
5 changed files with 118 additions and 89 deletions

View file

@ -35,25 +35,21 @@ class YARARules extends Operation {
{
name: "Show strings",
type: "boolean",
hint: "Show each match's data",
value: false
},
{
name: "Show string lengths",
type: "boolean",
hint: "Show the length of each match's data",
value: false
},
{
name: "Show metadata",
type: "boolean",
hint: "Show the metadata of each rule",
value: false
},
{
name: "Show counts",
type: "boolean",
hint: "Show the number of matches per rule",
value: true
}
];
@ -66,7 +62,7 @@ class YARARules extends Operation {
*/
run(input, args) {
if (ENVIRONMENT_IS_WORKER())
self.sendStatusMessage("Instantiating YARA.");
self.sendStatusMessage("Instantiating YARA...");
const [rules, showStrings, showLengths, showMeta, showCounts] = args;
return new Promise((resolve, reject) => {
Yara().then(yara => {