Magic signatures

This commit is contained in:
n1073645 2019-11-26 16:43:54 +00:00
parent 610d46a1a4
commit aa206d7b37
9 changed files with 88 additions and 0 deletions

View file

@ -44,6 +44,28 @@ class BaconCipherDecode extends Operation {
"value": false "value": false
} }
]; ];
this.patterns = [
{
match: "^([01]{5}\\s?)+$",
flags: "",
args: ["Complete", "0/1", false]
},
{
match: "^([01]{5}\\s?)+$",
flags: "",
args: ["Complete", "0/1", true]
},
{
match: "^([AB]{5}\\s?)+$",
flags: "",
args: ["Complete", "A/B", false]
},
{
match: "^([AB]{5}\\s?)+$",
flags: "",
args: ["Complete", "A/B", true]
}
];
} }
/** /**

View file

@ -42,6 +42,13 @@ class CSVToJSON extends Operation {
value: ["Array of dictionaries", "Array of arrays"] value: ["Array of dictionaries", "Array of arrays"]
} }
]; ];
this.patterns = [
{
match: "([A-Z\s]*,){5}",
flags: "i",
args: [",", "\r\n", "Array of dictionaries"]
}
];
} }
/** /**

View file

@ -37,6 +37,23 @@ class ChangeIPFormat extends Operation {
"value": ["Dotted Decimal", "Decimal", "Octal", "Hex"] "value": ["Dotted Decimal", "Decimal", "Octal", "Hex"]
} }
]; ];
this.patterns = [
{
match: "([0-9]{1,3}\\.){3}[0-9]{1,3}",
flags: "",
args: ["Dotted Decimal","Decimal"]
},
{
match: "([0-9]{1,3}\\.){3}[0-9]{1,3}",
flags: "",
args: ["Dotted Decimal","Octal"]
},
{
match: "([0-9]{1,3}\\.){3}[0-9]{1,3}",
flags: "",
args: ["Dotted Decimal","Hex"]
}
];
} }
/** /**

View file

@ -24,6 +24,13 @@ class DechunkHTTPResponse extends Operation {
this.inputType = "string"; this.inputType = "string";
this.outputType = "string"; this.outputType = "string";
this.args = []; this.args = [];
this.patterns = [
{
match: "^[0-9A-F]+\r\n",
flags: "i",
args: []
}
];
} }
/** /**

View file

@ -30,6 +30,13 @@ class DecodeNetBIOSName extends Operation {
"value": 65 "value": 65
} }
]; ];
this.patterns = [
{
match: "^\\S{16}$",
flags: "",
args: [65]
}
];
} }
/** /**

View file

@ -55,6 +55,13 @@ class FormatMACAddresses extends Operation {
"value": false "value": false
} }
]; ];
this.patterns = [
{
match: "^([0-9a-f]{2}:){5}[0-9a-f]{2}$",
flags: "i",
args: ["Both", true, true, true, true, true]
}
];
} }
/** /**

View file

@ -26,6 +26,13 @@ class FromHexContent extends Operation {
this.inputType = "string"; this.inputType = "string";
this.outputType = "byteArray"; this.outputType = "byteArray";
this.args = []; this.args = [];
this.patterns = [
{
match: "^.+?\\|[0-9a-f]{2}\\|.+$",
flags: "i",
args: []
}
];
} }
/** /**

View file

@ -23,6 +23,13 @@ class RemoveLineNumbers extends Operation {
this.inputType = "string"; this.inputType = "string";
this.outputType = "string"; this.outputType = "string";
this.args = []; this.args = [];
this.patterns = [
{
match: "^([0-9]+ .*?(\\n))+[0-9] .+$",
flags: "",
args: []
}
];
} }
/** /**

View file

@ -24,6 +24,13 @@ class StripHTTPHeaders extends Operation {
this.inputType = "string"; this.inputType = "string";
this.outputType = "string"; this.outputType = "string";
this.args = []; this.args = [];
this.patterns = [
{
match: "^HTTP(.|\\s)+?(\\r?\\n){2}",
flags: "",
args: []
}
];
} }
/** /**