mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-14 10:06:58 -04:00
Added the magic flag to regexes to say whether it is useful for magic to use
This commit is contained in:
parent
4d9fb7ef58
commit
8df9d6fcf6
43 changed files with 142 additions and 32 deletions
|
@ -87,13 +87,14 @@ class potentialOps {
|
|||
for (const op in OperationConfig) {
|
||||
if (("inputRegexes" in OperationConfig[op]) && !!(OperationConfig[op].inputRegexes))
|
||||
OperationConfig[op].inputRegexes.forEach(pattern => {
|
||||
opPatterns.push({
|
||||
op: op,
|
||||
match: pattern.match,
|
||||
flags: pattern.flags,
|
||||
args: pattern.args,
|
||||
useful: pattern.useful || false
|
||||
});
|
||||
if(pattern.magic)
|
||||
opPatterns.push({
|
||||
op: op,
|
||||
match: pattern.match,
|
||||
flags: pattern.flags,
|
||||
args: pattern.args,
|
||||
useful: pattern.useful || false
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -110,14 +111,15 @@ class potentialOps {
|
|||
for (const op in OperationConfig) {
|
||||
if ((OperationConfig[op].outputRegexes) && !(OperationConfig[op].inputRegexes))
|
||||
OperationConfig[op].outputRegexes.forEach(pattern => {
|
||||
opPatterns.push({
|
||||
op: op,
|
||||
match: pattern.match,
|
||||
flags: pattern.flags,
|
||||
shouldMatch: pattern.shouldMatch,
|
||||
args: pattern.args,
|
||||
useful: pattern.useful || false
|
||||
});
|
||||
if(pattern.magic)
|
||||
opPatterns.push({
|
||||
op: op,
|
||||
match: pattern.match,
|
||||
flags: pattern.flags,
|
||||
shouldMatch: pattern.shouldMatch,
|
||||
args: pattern.args,
|
||||
useful: pattern.useful || false
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue