More signatures for magic

This commit is contained in:
n1073645 2019-11-27 15:59:22 +00:00
parent a2eadee06a
commit 5853074052
6 changed files with 43 additions and 0 deletions

View file

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

View file

@ -28,6 +28,13 @@ class ParseIPv6Address extends Operation {
this.inputType = "string";
this.outputType = "string";
this.args = [];
this.patterns = [
{
match: "^\\s*([a-f\\d]{4}:?)+\\s*$",
flags: "i",
args: []
}
];
}
/**

View file

@ -38,6 +38,13 @@ class ParseSSHHostKey extends Operation {
]
}
];
this.patterns = [
{
match: "^\\s*([A-F\\d]{2}[,;:]){15,}[A-F\\d]{2}\\s*$",
flags: "i",
args: ["Hex"]
}
];
}
/**

View file

@ -25,6 +25,13 @@ class ParseUNIXFilePermissions extends Operation {
this.inputType = "string";
this.outputType = "string";
this.args = [];
this.patterns = [
{
match: "^\\s*d[rxw-]{9}\\s*$",
flags: "",
args: []
}
];
}
/**

View file

@ -25,6 +25,13 @@ class ParseUserAgent extends Operation {
this.inputType = "string";
this.outputType = "string";
this.args = [];
this.patterns = [
{
match: "^(User-Agent:|Mozilla\\/)[^\\n\\r]+\\s*$",
flags: "i",
args: []
}
]
}
/**

View file

@ -35,6 +35,14 @@ class StripHTMLTags extends Operation {
"value": true
}
];
this.patterns = [
{
match: "^<html>(\\S|\\s)*</html>$",
flags: "i",
args: [true, true]
}
];
}
/**