mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 15:26:16 -04:00
add boolean args
removeNonAlphChars, strictMode
This commit is contained in:
parent
d9fb3e28dd
commit
58b0d06760
1 changed files with 12 additions and 2 deletions
|
@ -30,6 +30,16 @@ class FromHex extends Operation {
|
||||||
name: "Delimiter",
|
name: "Delimiter",
|
||||||
type: "option",
|
type: "option",
|
||||||
value: FROM_HEX_DELIM_OPTIONS
|
value: FROM_HEX_DELIM_OPTIONS
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Remove non-alphabet chars",
|
||||||
|
type: "boolean",
|
||||||
|
value: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Strict mode",
|
||||||
|
type: "boolean",
|
||||||
|
value: false
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
this.checks = [
|
this.checks = [
|
||||||
|
@ -92,8 +102,8 @@ class FromHex extends Operation {
|
||||||
* @returns {byteArray}
|
* @returns {byteArray}
|
||||||
*/
|
*/
|
||||||
run(input, args) {
|
run(input, args) {
|
||||||
const delim = args[0] || "Auto";
|
const [delim, removeNonAlphChars, strictMode] = [args[0] || "Auto", args[1], args[2]];
|
||||||
return fromHex(input, delim, 2);
|
return fromHex(input, delim, 2, removeNonAlphChars, strictMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue