|
@@ -30,6 +30,7 @@ import NetBIOS from "../operations/NetBIOS.js";
|
|
import PHP from "../operations/PHP.js";
|
|
import PHP from "../operations/PHP.js";
|
|
import PublicKey from "../operations/PublicKey.js";
|
|
import PublicKey from "../operations/PublicKey.js";
|
|
import Punycode from "../operations/Punycode.js";
|
|
import Punycode from "../operations/Punycode.js";
|
|
|
|
+import Regex from "../operations/Regex.js";
|
|
import Rotate from "../operations/Rotate.js";
|
|
import Rotate from "../operations/Rotate.js";
|
|
import SeqUtils from "../operations/SeqUtils.js";
|
|
import SeqUtils from "../operations/SeqUtils.js";
|
|
import Shellcode from "../operations/Shellcode.js";
|
|
import Shellcode from "../operations/Shellcode.js";
|
|
@@ -2058,7 +2059,7 @@ const OperationConfig = {
|
|
args: []
|
|
args: []
|
|
},
|
|
},
|
|
"Find / Replace": {
|
|
"Find / Replace": {
|
|
- module: "Default",
|
|
|
|
|
|
+ module: "Regex",
|
|
description: "Replaces all occurrences of the first string with the second.<br><br> Includes support for regular expressions (regex), simple strings and extended strings (which support \\n, \\r, \\t, \\b, \\f and escaped hex bytes using \\x notation, e.g. \\x00 for a null byte).",
|
|
description: "Replaces all occurrences of the first string with the second.<br><br> Includes support for regular expressions (regex), simple strings and extended strings (which support \\n, \\r, \\t, \\b, \\f and escaped hex bytes using \\x notation, e.g. \\x00 for a null byte).",
|
|
manualBake: true,
|
|
manualBake: true,
|
|
inputType: "string",
|
|
inputType: "string",
|
|
@@ -2068,7 +2069,7 @@ const OperationConfig = {
|
|
name: "Find",
|
|
name: "Find",
|
|
type: "toggleString",
|
|
type: "toggleString",
|
|
value: "",
|
|
value: "",
|
|
- toggleValues: StrUtils.SEARCH_TYPE
|
|
|
|
|
|
+ toggleValues: Regex.SEARCH_TYPE
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "Replace",
|
|
name: "Replace",
|
|
@@ -2078,17 +2079,17 @@ const OperationConfig = {
|
|
{
|
|
{
|
|
name: "Global match",
|
|
name: "Global match",
|
|
type: "boolean",
|
|
type: "boolean",
|
|
- value: StrUtils.FIND_REPLACE_GLOBAL,
|
|
|
|
|
|
+ value: Regex.FIND_REPLACE_GLOBAL,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "Case insensitive",
|
|
name: "Case insensitive",
|
|
type: "boolean",
|
|
type: "boolean",
|
|
- value: StrUtils.FIND_REPLACE_CASE,
|
|
|
|
|
|
+ value: Regex.FIND_REPLACE_CASE,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "Multiline matching",
|
|
name: "Multiline matching",
|
|
type: "boolean",
|
|
type: "boolean",
|
|
- value: StrUtils.FIND_REPLACE_MULTILINE,
|
|
|
|
|
|
+ value: Regex.FIND_REPLACE_MULTILINE,
|
|
},
|
|
},
|
|
|
|
|
|
]
|
|
]
|
|
@@ -2160,7 +2161,7 @@ const OperationConfig = {
|
|
]
|
|
]
|
|
},
|
|
},
|
|
"Strings": {
|
|
"Strings": {
|
|
- module: "Default",
|
|
|
|
|
|
+ module: "Regex",
|
|
description: "Extracts all strings from the input.",
|
|
description: "Extracts all strings from the input.",
|
|
inputType: "string",
|
|
inputType: "string",
|
|
outputType: "string",
|
|
outputType: "string",
|
|
@@ -2174,11 +2175,16 @@ const OperationConfig = {
|
|
name: "Display total",
|
|
name: "Display total",
|
|
type: "boolean",
|
|
type: "boolean",
|
|
value: Extract.DISPLAY_TOTAL
|
|
value: Extract.DISPLAY_TOTAL
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: "Encoding",
|
|
|
|
+ type: "option",
|
|
|
|
+ value: Extract.ENCODING_LIST
|
|
}
|
|
}
|
|
]
|
|
]
|
|
},
|
|
},
|
|
"Extract IP addresses": {
|
|
"Extract IP addresses": {
|
|
- module: "Default",
|
|
|
|
|
|
+ module: "Regex",
|
|
description: "Extracts all IPv4 and IPv6 addresses.<br><br>Warning: Given a string <code>710.65.0.456</code>, this will match <code>10.65.0.45</code> so always check the original input!",
|
|
description: "Extracts all IPv4 and IPv6 addresses.<br><br>Warning: Given a string <code>710.65.0.456</code>, this will match <code>10.65.0.45</code> so always check the original input!",
|
|
inputType: "string",
|
|
inputType: "string",
|
|
outputType: "string",
|
|
outputType: "string",
|
|
@@ -2206,7 +2212,7 @@ const OperationConfig = {
|
|
]
|
|
]
|
|
},
|
|
},
|
|
"Extract email addresses": {
|
|
"Extract email addresses": {
|
|
- module: "Default",
|
|
|
|
|
|
+ module: "Regex",
|
|
description: "Extracts all email addresses from the input.",
|
|
description: "Extracts all email addresses from the input.",
|
|
inputType: "string",
|
|
inputType: "string",
|
|
outputType: "string",
|
|
outputType: "string",
|
|
@@ -2219,7 +2225,7 @@ const OperationConfig = {
|
|
]
|
|
]
|
|
},
|
|
},
|
|
"Extract MAC addresses": {
|
|
"Extract MAC addresses": {
|
|
- module: "Default",
|
|
|
|
|
|
+ module: "Regex",
|
|
description: "Extracts all Media Access Control (MAC) addresses from the input.",
|
|
description: "Extracts all Media Access Control (MAC) addresses from the input.",
|
|
inputType: "string",
|
|
inputType: "string",
|
|
outputType: "string",
|
|
outputType: "string",
|
|
@@ -2232,7 +2238,7 @@ const OperationConfig = {
|
|
]
|
|
]
|
|
},
|
|
},
|
|
"Extract URLs": {
|
|
"Extract URLs": {
|
|
- module: "Default",
|
|
|
|
|
|
+ module: "Regex",
|
|
description: "Extracts Uniform Resource Locators (URLs) from the input. The protocol (http, ftp etc.) is required otherwise there will be far too many false positives.",
|
|
description: "Extracts Uniform Resource Locators (URLs) from the input. The protocol (http, ftp etc.) is required otherwise there will be far too many false positives.",
|
|
inputType: "string",
|
|
inputType: "string",
|
|
outputType: "string",
|
|
outputType: "string",
|
|
@@ -2245,7 +2251,7 @@ const OperationConfig = {
|
|
]
|
|
]
|
|
},
|
|
},
|
|
"Extract domains": {
|
|
"Extract domains": {
|
|
- module: "Default",
|
|
|
|
|
|
+ module: "Regex",
|
|
description: "Extracts domain names.<br>Note that this will not include paths. Use <strong>Extract URLs</strong> to find entire URLs.",
|
|
description: "Extracts domain names.<br>Note that this will not include paths. Use <strong>Extract URLs</strong> to find entire URLs.",
|
|
inputType: "string",
|
|
inputType: "string",
|
|
outputType: "string",
|
|
outputType: "string",
|
|
@@ -2258,7 +2264,7 @@ const OperationConfig = {
|
|
]
|
|
]
|
|
},
|
|
},
|
|
"Extract file paths": {
|
|
"Extract file paths": {
|
|
- module: "Default",
|
|
|
|
|
|
+ module: "Regex",
|
|
description: "Extracts anything that looks like a Windows or UNIX file path.<br><br>Note that if UNIX is selected, there will likely be a lot of false positives.",
|
|
description: "Extracts anything that looks like a Windows or UNIX file path.<br><br>Note that if UNIX is selected, there will likely be a lot of false positives.",
|
|
inputType: "string",
|
|
inputType: "string",
|
|
outputType: "string",
|
|
outputType: "string",
|
|
@@ -2281,7 +2287,7 @@ const OperationConfig = {
|
|
]
|
|
]
|
|
},
|
|
},
|
|
"Extract dates": {
|
|
"Extract dates": {
|
|
- module: "Default",
|
|
|
|
|
|
+ module: "Regex",
|
|
description: "Extracts dates in the following formats<ul><li><code>yyyy-mm-dd</code></li><li><code>dd/mm/yyyy</code></li><li><code>mm/dd/yyyy</code></li></ul>Dividers can be any of /, -, . or space",
|
|
description: "Extracts dates in the following formats<ul><li><code>yyyy-mm-dd</code></li><li><code>dd/mm/yyyy</code></li><li><code>mm/dd/yyyy</code></li></ul>Dividers can be any of /, -, . or space",
|
|
inputType: "string",
|
|
inputType: "string",
|
|
outputType: "string",
|
|
outputType: "string",
|
|
@@ -2294,7 +2300,7 @@ const OperationConfig = {
|
|
]
|
|
]
|
|
},
|
|
},
|
|
"Regular expression": {
|
|
"Regular expression": {
|
|
- module: "Default",
|
|
|
|
|
|
+ module: "Regex",
|
|
description: "Define your own regular expression (regex) to search the input data with, optionally choosing from a list of pre-defined patterns.",
|
|
description: "Define your own regular expression (regex) to search the input data with, optionally choosing from a list of pre-defined patterns.",
|
|
manualBake: true,
|
|
manualBake: true,
|
|
inputType: "string",
|
|
inputType: "string",
|
|
@@ -2303,7 +2309,7 @@ const OperationConfig = {
|
|
{
|
|
{
|
|
name: "Built in regexes",
|
|
name: "Built in regexes",
|
|
type: "populateOption",
|
|
type: "populateOption",
|
|
- value: StrUtils.REGEX_PRE_POPULATE,
|
|
|
|
|
|
+ value: Regex.REGEX_PRE_POPULATE,
|
|
target: 1,
|
|
target: 1,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -2314,22 +2320,22 @@ const OperationConfig = {
|
|
{
|
|
{
|
|
name: "Case insensitive",
|
|
name: "Case insensitive",
|
|
type: "boolean",
|
|
type: "boolean",
|
|
- value: StrUtils.REGEX_CASE_INSENSITIVE
|
|
|
|
|
|
+ value: Regex.REGEX_CASE_INSENSITIVE
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "Multiline matching",
|
|
name: "Multiline matching",
|
|
type: "boolean",
|
|
type: "boolean",
|
|
- value: StrUtils.REGEX_MULTILINE_MATCHING
|
|
|
|
|
|
+ value: Regex.REGEX_MULTILINE_MATCHING
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "Display total",
|
|
name: "Display total",
|
|
type: "boolean",
|
|
type: "boolean",
|
|
- value: StrUtils.DISPLAY_TOTAL
|
|
|
|
|
|
+ value: Regex.DISPLAY_TOTAL
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name: "Output format",
|
|
name: "Output format",
|
|
type: "option",
|
|
type: "option",
|
|
- value: StrUtils.OUTPUT_FORMAT
|
|
|
|
|
|
+ value: Regex.OUTPUT_FORMAT
|
|
},
|
|
},
|
|
]
|
|
]
|
|
},
|
|
},
|