mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-26 17:56:15 -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",
|
||||
type: "option",
|
||||
value: FROM_HEX_DELIM_OPTIONS
|
||||
},
|
||||
{
|
||||
name: "Remove non-alphabet chars",
|
||||
type: "boolean",
|
||||
value: true
|
||||
},
|
||||
{
|
||||
name: "Strict mode",
|
||||
type: "boolean",
|
||||
value: false
|
||||
}
|
||||
];
|
||||
this.checks = [
|
||||
|
@ -92,8 +102,8 @@ class FromHex extends Operation {
|
|||
* @returns {byteArray}
|
||||
*/
|
||||
run(input, args) {
|
||||
const delim = args[0] || "Auto";
|
||||
return fromHex(input, delim, 2);
|
||||
const [delim, removeNonAlphChars, strictMode] = [args[0] || "Auto", args[1], args[2]];
|
||||
return fromHex(input, delim, 2, removeNonAlphChars, strictMode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue