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
|
@ -10,7 +10,6 @@ import Operation from "../Operation.mjs";
|
|||
import OperationError from "../errors/OperationError.mjs";
|
||||
import Utils from "../Utils.mjs";
|
||||
import {isImage} from "../lib/FileType.mjs";
|
||||
import magicObject from "../lib/MagicObject.mjs";
|
||||
|
||||
/**
|
||||
* Render Image operation
|
||||
|
@ -36,20 +35,20 @@ class RenderImage extends Operation {
|
|||
"value": ["Raw", "Base64", "Hex"]
|
||||
}
|
||||
];
|
||||
this.checks = new magicObject([
|
||||
{
|
||||
match: "^(?:\\xff\\xd8\\xff|\\x89\\x50\\x4e\\x47|\\x47\\x49\\x46|.{8}\\x57\\x45\\x42\\x50|\\x42\\x4d)",
|
||||
flags: "",
|
||||
magic: true,
|
||||
args: ["Raw"],
|
||||
useful: true
|
||||
}
|
||||
],
|
||||
null,
|
||||
this.checks =
|
||||
{
|
||||
type: "image"
|
||||
}
|
||||
);
|
||||
inRegexes: [
|
||||
{
|
||||
match: "^(?:\\xff\\xd8\\xff|\\x89\\x50\\x4e\\x47|\\x47\\x49\\x46|.{8}\\x57\\x45\\x42\\x50|\\x42\\x4d)",
|
||||
flags: "",
|
||||
magic: true,
|
||||
args: ["Raw"],
|
||||
useful: true
|
||||
}],
|
||||
mimeCheck: {
|
||||
type: "image"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue