mirror of
https://github.com/gchq/CyberChef
synced 2025-01-13 04:58:49 +00:00
Whitespace is now removed from hex and binary even when the delimiter is set to 'None'
This commit is contained in:
parent
1b628ac213
commit
d4d12c3db0
2 changed files with 4 additions and 5 deletions
|
@ -1235,7 +1235,8 @@ const Utils = {
|
||||||
"Forward slash": /\//g,
|
"Forward slash": /\//g,
|
||||||
"Backslash": /\\/g,
|
"Backslash": /\\/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
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -288,10 +288,8 @@ const ByteRepr = {
|
||||||
* @returns {byteArray}
|
* @returns {byteArray}
|
||||||
*/
|
*/
|
||||||
runFromBinary: function(input, args) {
|
runFromBinary: function(input, args) {
|
||||||
if (args[0] !== "None") {
|
const delimRegex = Utils.regexRep[args[0] || "Space"];
|
||||||
const delimRegex = Utils.regexRep[args[0] || "Space"];
|
input = input.replace(delimRegex, "");
|
||||||
input = input.replace(delimRegex, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
const output = [];
|
const output = [];
|
||||||
const byteLen = 8;
|
const byteLen = 8;
|
||||||
|
|
Loading…
Reference in a new issue