mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 06:01:02 +01:00
Tweaked Extract Files minimum size
This commit is contained in:
parent
bb6c1c54ff
commit
fc95d82c49
@ -58,7 +58,7 @@ class ExtractFiles extends Operation {
|
|||||||
{
|
{
|
||||||
name: "Minimum File Size",
|
name: "Minimum File Size",
|
||||||
type: "number",
|
type: "number",
|
||||||
value: 0
|
value: 100
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -86,8 +86,8 @@ class ExtractFiles extends Operation {
|
|||||||
const errors = [];
|
const errors = [];
|
||||||
detectedFiles.forEach(detectedFile => {
|
detectedFiles.forEach(detectedFile => {
|
||||||
try {
|
try {
|
||||||
let file;
|
const file = extractFile(bytes, detectedFile.fileDetails, detectedFile.offset);
|
||||||
if ((file = extractFile(bytes, detectedFile.fileDetails, detectedFile.offset)).size >= minSize)
|
if (file.size >= minSize)
|
||||||
files.push(file);
|
files.push(file);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (!ignoreFailedExtractions && err.message.indexOf("No extraction algorithm available") < 0) {
|
if (!ignoreFailedExtractions && err.message.indexOf("No extraction algorithm available") < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user