mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 16:26:16 -04:00
Tidied up the Magic operation
This commit is contained in:
parent
26fa66ef64
commit
b765534b8b
43 changed files with 771 additions and 900 deletions
|
@ -43,31 +43,9 @@ for (const opObj in Ops) {
|
|||
flowControl: op.flowControl,
|
||||
manualBake: op.manualBake,
|
||||
args: op.args,
|
||||
checks: op.checks
|
||||
};
|
||||
|
||||
if ("checks" in op) {
|
||||
if ("input" in op.checks) {
|
||||
operationConfig[op.name].input = {};
|
||||
if ("regex" in op.checks.input) {
|
||||
operationConfig[op.name].input.regex = op.checks.input.regex;
|
||||
}
|
||||
if ("entropy" in op.checks.input) {
|
||||
operationConfig[op.name].input.entropy = op.checks.input.entropy;
|
||||
}
|
||||
}
|
||||
if ("output" in op.checks) {
|
||||
operationConfig[op.name].output = {};
|
||||
if ("regex" in op.checks.output) {
|
||||
operationConfig[op.name].output.regex = op.checks.output.regex;
|
||||
}
|
||||
if ("entropy" in op.checks.output) {
|
||||
operationConfig[op.name].output.entropy = op.checks.output.entropy;
|
||||
}
|
||||
if ("mime" in op.checks.output) {
|
||||
operationConfig[op.name].output.mime = op.checks.output.mime;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!(op.module in modules))
|
||||
modules[op.module] = {};
|
||||
modules[op.module][op.name] = opObj;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue