mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-11 00:31:31 -04:00
Linting
This commit is contained in:
parent
ee3e6751be
commit
b61fd59b60
3 changed files with 13 additions and 13 deletions
|
@ -262,15 +262,15 @@ class Magic {
|
||||||
// method on the resulting data, recording the properties of each option.
|
// method on the resulting data, recording the properties of each option.
|
||||||
await Promise.all(sensible.map(async op => {
|
await Promise.all(sensible.map(async op => {
|
||||||
const opConfig = {
|
const opConfig = {
|
||||||
op: op.op,
|
op: op.op,
|
||||||
args: op.args
|
args: op.args
|
||||||
};
|
};
|
||||||
let output;
|
let output;
|
||||||
try {
|
try {
|
||||||
output = await this._runRecipe([opConfig]);
|
output = await this._runRecipe([opConfig]);
|
||||||
} catch(err) {
|
} catch (err) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// If the recipe is repeating and returning the same data, do not continue
|
// If the recipe is repeating and returning the same data, do not continue
|
||||||
if (prevOp && op.op === prevOp.op && _buffersEqual(output, this.inputBuffer)) {
|
if (prevOp && op.op === prevOp.op && _buffersEqual(output, this.inputBuffer)) {
|
||||||
return;
|
return;
|
||||||
|
@ -280,7 +280,7 @@ class Magic {
|
||||||
if (_buffersEqual(output, new ArrayBuffer())) {
|
if (_buffersEqual(output, new ArrayBuffer())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const outputRegexes = OperationConfig[op.op].outputRegexes;
|
const outputRegexes = OperationConfig[op.op].outputRegexes;
|
||||||
switch (flag) {
|
switch (flag) {
|
||||||
case "Input":
|
case "Input":
|
||||||
|
|
|
@ -120,7 +120,7 @@ class potentialOps {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.log(opPatterns);
|
|
||||||
return opPatterns;
|
return opPatterns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,13 @@ class DefangIPAddresses extends Operation {
|
||||||
this.inputType = "string";
|
this.inputType = "string";
|
||||||
this.outputType = "string";
|
this.outputType = "string";
|
||||||
this.args = [];
|
this.args = [];
|
||||||
this.checks = new magicObject(/*[
|
this.checks = new magicObject([
|
||||||
{
|
{
|
||||||
match: "^\\s*(([0-9]{1,3}\\.){3}[0-9]{1,3}|([0-9a-f]{4}:){7}[0-9a-f]{4})\\s*$",
|
match: "^\\s*(([0-9]{1,3}\\.){3}[0-9]{1,3}|([0-9a-f]{4}:){7}[0-9a-f]{4})\\s*$",
|
||||||
flags: "i",
|
flags: "i",
|
||||||
args: [],
|
args: [],
|
||||||
}
|
}
|
||||||
],*/null,
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
match: "^\\s*(([0-9]{1,3}\\[\\.\\]){3}[0-9]{1,3}|([0-9a-f]{4}\\[\\:\\]){7}[0-9a-f]{4})\\s*$",
|
match: "^\\s*(([0-9]{1,3}\\[\\.\\]){3}[0-9]{1,3}|([0-9a-f]{4}\\[\\:\\]){7}[0-9a-f]{4})\\s*$",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue