mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Add Output Filter option to Magic operation
This commit is contained in:
parent
79b9b63982
commit
283d7f2159
2 changed files with 13 additions and 5 deletions
|
@ -43,6 +43,11 @@ class Magic extends Operation {
|
|||
"name": "Extensive language support",
|
||||
"type": "boolean",
|
||||
"value": false
|
||||
},
|
||||
{
|
||||
"name": "Output Filter (Regex)",
|
||||
"type": "string",
|
||||
"value": ""
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -56,10 +61,10 @@ class Magic extends Operation {
|
|||
*/
|
||||
async run(state) {
|
||||
const ings = state.opList[state.progress].ingValues,
|
||||
[depth, intensive, extLang] = ings,
|
||||
[depth, intensive, extLang, filter] = ings,
|
||||
dish = state.dish,
|
||||
magic = new MagicLib(await dish.get(Dish.ARRAY_BUFFER)),
|
||||
options = await magic.speculativeExecution(depth, extLang, intensive);
|
||||
options = await magic.speculativeExecution(depth, extLang, intensive, [], false, filter);
|
||||
|
||||
// Record the current state for use when presenting
|
||||
this.state = state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue