diff --git a/src/core/operations/BaconCipherDecode.mjs b/src/core/operations/BaconCipherDecode.mjs index 90213d41..68125c4d 100644 --- a/src/core/operations/BaconCipherDecode.mjs +++ b/src/core/operations/BaconCipherDecode.mjs @@ -46,22 +46,42 @@ class BaconCipherDecode extends Operation { ]; this.patterns = [ { - match: "^([01]{5}\\s?)+$", + match: "^\\s*([01]{5}\\s?)+$", + flags: "", + args: ["Standard (I=J and U=V)", "0/1", false] + }, + { + match: "^\\s*([01]{5}\\s?)+$", + flags: "", + args: ["Standard (I=J and U=V)", "0/1", true] + }, + { + match: "^\\s*([AB]{5}\\s?)+$", + flags: "", + args: ["Standard (I=J and U=V)", "A/B", false] + }, + { + match: "^\\s*([AB]{5}\\s?)+$", + flags: "", + args: ["Standard (I=J and U=V)", "A/B", true] + }, + { + match: "^\\s*([01]{5}\\s?)+$", flags: "", args: ["Complete", "0/1", false] }, { - match: "^([01]{5}\\s?)+$", + match: "^\\s*([01]{5}\\s?)+$", flags: "", args: ["Complete", "0/1", true] }, { - match: "^([AB]{5}\\s?)+$", + match: "^\\s*([AB]{5}\\s?)+$", flags: "", args: ["Complete", "A/B", false] }, { - match: "^([AB]{5}\\s?)+$", + match: "^\\s*([AB]{5}\\s?)+$", flags: "", args: ["Complete", "A/B", true] } diff --git a/src/core/operations/CSVToJSON.mjs b/src/core/operations/CSVToJSON.mjs index b729e86e..dacb7a52 100644 --- a/src/core/operations/CSVToJSON.mjs +++ b/src/core/operations/CSVToJSON.mjs @@ -44,9 +44,14 @@ class CSVToJSON extends Operation { ]; this.patterns = [ { - match: "([A-Z\s]*,){5}", + match: "^\\s*([A-Z\\s]*,){5}", flags: "i", args: [",", "\r\n", "Array of dictionaries"] + }, + { + match: "^\\s*([A-Z\\s]*,){5}", + flags: "i", + args: [",", "\r\n", "Array of arrays"] } ]; } diff --git a/src/core/operations/ChangeIPFormat.mjs b/src/core/operations/ChangeIPFormat.mjs index ffb00739..a95ab07a 100644 --- a/src/core/operations/ChangeIPFormat.mjs +++ b/src/core/operations/ChangeIPFormat.mjs @@ -39,19 +39,19 @@ class ChangeIPFormat extends Operation { ]; this.patterns = [ { - match: "([0-9]{1,3}\\.){3}[0-9]{1,3}", + match: "^\\s*([0-9]{1,3}\\.){3}[0-9]{1,3}$", flags: "", - args: ["Dotted Decimal","Decimal"] + args: ["Dotted Decimal", "Decimal"] }, { - match: "([0-9]{1,3}\\.){3}[0-9]{1,3}", + match: "^\\s*([0-9]{1,3}\\.){3}[0-9]{1,3}$", flags: "", - args: ["Dotted Decimal","Octal"] + args: ["Dotted Decimal", "Octal"] }, { - match: "([0-9]{1,3}\\.){3}[0-9]{1,3}", + match: "^\\s*([0-9]{1,3}\\.){3}[0-9]{1,3}$", flags: "", - args: ["Dotted Decimal","Hex"] + args: ["Dotted Decimal", "Hex"] } ]; } diff --git a/src/core/operations/DechunkHTTPResponse.mjs b/src/core/operations/DechunkHTTPResponse.mjs index f26deb4b..9ffe5eaf 100644 --- a/src/core/operations/DechunkHTTPResponse.mjs +++ b/src/core/operations/DechunkHTTPResponse.mjs @@ -26,7 +26,7 @@ class DechunkHTTPResponse extends Operation { this.args = []; this.patterns = [ { - match: "^[0-9A-F]+\r\n", + match: "^\\s*[0-9A-F]+\r\n", flags: "i", args: [] } diff --git a/src/core/operations/DecodeNetBIOSName.mjs b/src/core/operations/DecodeNetBIOSName.mjs index d7a86c26..9da83ce4 100644 --- a/src/core/operations/DecodeNetBIOSName.mjs +++ b/src/core/operations/DecodeNetBIOSName.mjs @@ -32,7 +32,7 @@ class DecodeNetBIOSName extends Operation { ]; this.patterns = [ { - match: "^\\S{16}$", + match: "^\\s*\\S{32}$", flags: "", args: [65] } diff --git a/src/core/operations/FormatMACAddresses.mjs b/src/core/operations/FormatMACAddresses.mjs index 9a14a96a..73bf7025 100644 --- a/src/core/operations/FormatMACAddresses.mjs +++ b/src/core/operations/FormatMACAddresses.mjs @@ -57,7 +57,7 @@ class FormatMACAddresses extends Operation { ]; this.patterns = [ { - match: "^([0-9a-f]{2}:){5}[0-9a-f]{2}$", + match: "^\\s*([0-9a-f]{2}:){5}[0-9a-f]{2}$", flags: "i", args: ["Both", true, true, true, true, true] } diff --git a/src/core/operations/FromHexContent.mjs b/src/core/operations/FromHexContent.mjs index 11a705e6..d9785747 100644 --- a/src/core/operations/FromHexContent.mjs +++ b/src/core/operations/FromHexContent.mjs @@ -28,7 +28,7 @@ class FromHexContent extends Operation { this.args = []; this.patterns = [ { - match: "^.+?\\|[0-9a-f]{2}\\|.+$", + match: "^\\s*.*?\\|([0-9a-f]{2})+\\|.*$", flags: "i", args: [] } diff --git a/src/core/operations/RemoveLineNumbers.mjs b/src/core/operations/RemoveLineNumbers.mjs index a931524b..a80c9497 100644 --- a/src/core/operations/RemoveLineNumbers.mjs +++ b/src/core/operations/RemoveLineNumbers.mjs @@ -25,7 +25,7 @@ class RemoveLineNumbers extends Operation { this.args = []; this.patterns = [ { - match: "^([0-9]+ .*?(\\n))+[0-9] .+$", + match: "^\\s*([0-9]+ .*?(\\n))+[0-9] .+$", flags: "", args: [] } diff --git a/src/core/operations/StripHTTPHeaders.mjs b/src/core/operations/StripHTTPHeaders.mjs index f0ac1fb4..3f3ea3de 100644 --- a/src/core/operations/StripHTTPHeaders.mjs +++ b/src/core/operations/StripHTTPHeaders.mjs @@ -26,7 +26,7 @@ class StripHTTPHeaders extends Operation { this.args = []; this.patterns = [ { - match: "^HTTP(.|\\s)+?(\\r?\\n){2}", + match: "^\\s*HTTP(.|\\s)+?(\\r?\\n){2}", flags: "", args: [] }