mirror of
https://github.com/gchq/CyberChef
synced 2025-01-01 07:18:47 +00:00
Fix regular expresion crash in extract hashes
This commit is contained in:
parent
61295a968e
commit
6b95ba7dd6
1 changed files with 3 additions and 3 deletions
|
@ -68,8 +68,8 @@ class ExtractHashes extends Operation {
|
|||
const regex = new RegExp(`(\\b|^)[a-f0-9]{${hashCharacterLength}}(\\b|$)`, "g");
|
||||
const searchResults = search(input, regex, null, false);
|
||||
|
||||
hashCount += searchResults.split("\n").length - 1;
|
||||
results.push(searchResults);
|
||||
hashCount += searchResults.length;
|
||||
results.push(...searchResults);
|
||||
}
|
||||
|
||||
let output = "";
|
||||
|
@ -77,7 +77,7 @@ class ExtractHashes extends Operation {
|
|||
output = `Total Results: ${hashCount}\n\n`;
|
||||
}
|
||||
|
||||
output = output + results.join("");
|
||||
output = output + results.join("\n");
|
||||
return output;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue