mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-14 10:06:58 -04:00
Converted MagicObject to just dictionaries
This commit is contained in:
parent
c8b474eef4
commit
1bbcc8d542
44 changed files with 879 additions and 890 deletions
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
import Operation from "../Operation.mjs";
|
||||
import magicObject from "../lib/MagicObject.mjs";
|
||||
|
||||
/**
|
||||
* Escape Unicode Characters operation
|
||||
|
@ -45,26 +44,28 @@ class EscapeUnicodeCharacters extends Operation {
|
|||
"value": true
|
||||
}
|
||||
];
|
||||
this.checks = new magicObject([
|
||||
{
|
||||
match: "\\\\u(?:[\\da-f]{4,6})",
|
||||
flags: "i",
|
||||
magic: true,
|
||||
args: ["\\u"]
|
||||
},
|
||||
{
|
||||
match: "%u(?:[\\da-f]{4,6})",
|
||||
flags: "i",
|
||||
magic: true,
|
||||
args: ["%u"]
|
||||
},
|
||||
{
|
||||
match: "U\\+(?:[\\da-f]{4,6})",
|
||||
flags: "i",
|
||||
magic: true,
|
||||
args: ["U+"]
|
||||
},
|
||||
]);
|
||||
this.checks =
|
||||
{
|
||||
inRegexes: [
|
||||
{
|
||||
match: "\\\\u(?:[\\da-f]{4,6})",
|
||||
flags: "i",
|
||||
magic: true,
|
||||
args: ["\\u"]
|
||||
},
|
||||
{
|
||||
match: "%u(?:[\\da-f]{4,6})",
|
||||
flags: "i",
|
||||
magic: true,
|
||||
args: ["%u"]
|
||||
},
|
||||
{
|
||||
match: "U\\+(?:[\\da-f]{4,6})",
|
||||
flags: "i",
|
||||
magic: true,
|
||||
args: ["U+"]
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue