mirror of
https://github.com/gchq/CyberChef.git
synced 2026-01-30 04:10:31 -08:00
feat(magic): suggest OCR on image inputs (Magic)
- Add Magic checks to Optical Character Recognition to detect common image formats via magic bytes - Provide default args (show confidence, LSTM engine) when auto-suggested Authored-by: Izai Alejandro Zalles Merino <zallesrene@gmail.com>
This commit is contained in:
parent
a4f40405ef
commit
de2a83c0a0
1 changed files with 7 additions and 0 deletions
|
|
@ -46,6 +46,13 @@ class OpticalCharacterRecognition extends Operation {
|
|||
defaultIndex: 1
|
||||
}
|
||||
];
|
||||
this.checks = [
|
||||
{
|
||||
pattern: "^(?:\xff\xd8\xff|\x89\x50\x4e\x47|\x47\x49\x46|.{8}\x57\x45\x42\x50|\x42\x4d)",
|
||||
args: [true, "LSTM only"],
|
||||
useful: true
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue