mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 22:21:01 +01:00
From Hex Regexes
This commit is contained in:
parent
99415359d0
commit
3f3a7cd4f6
@ -1182,6 +1182,7 @@ class Utils {
|
|||||||
"CRLF": /\r\n/g,
|
"CRLF": /\r\n/g,
|
||||||
"Forward slash": /\//g,
|
"Forward slash": /\//g,
|
||||||
"Backslash": /\\/g,
|
"Backslash": /\\/g,
|
||||||
|
"0x with comma": /,?0x/g,
|
||||||
"0x": /0x/g,
|
"0x": /0x/g,
|
||||||
"\\x": /\\x/g,
|
"\\x": /\\x/g,
|
||||||
"None": /\s+/g // Included here to remove whitespace when there shouldn't be any
|
"None": /\s+/g // Included here to remove whitespace when there shouldn't be any
|
||||||
|
@ -71,12 +71,17 @@ class FromHex extends Operation {
|
|||||||
args: ["CRLF"]
|
args: ["CRLF"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: "^[\\dA-F]{2}(?:0x[\\dA-F]{2})*$",
|
match: "^(?:0x[\\dA-F]{2})+$",
|
||||||
flags: "i",
|
flags: "i",
|
||||||
args: ["0x"]
|
args: ["0x"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: "^[\\dA-F]{2}(?:\\\\x[\\dA-F]{2})*$",
|
match: "^0x[\\dA-F]{2}(?:,0x[\\dA-F]{2})*$",
|
||||||
|
flags: "i",
|
||||||
|
args: ["0x with comma"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
match: "^(?:\\\\x[\\dA-F]{2})+$",
|
||||||
flags: "i",
|
flags: "i",
|
||||||
args: ["\\x"]
|
args: ["\\x"]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user