Closed zyronix closed 3 months ago
Possible new solution for this:
while (($buffer = fgets($file, 4096)) !== false) {
foreach ($lineSeparators as $ls) {
if (strpos($buffer, $ls) !== false) {
$lineSeparator = $ls;
break;
}
}
if (!empty($lineSeparator)) {
break;
}
}
if (empty($lineSeparator)) {
$lineSeparator = "\n";
}
Version Information
1.14.2
Hashcat
No response
Description
When import hashes that containg more then 1024 chars, hashtopolis will fail to import them. Example:
This is due to a couple of things, inside the
HashlistUtils::processZap
there is the lined$buffer = fread($file, 1024);
This code will read 1024 bytes, if no newline was found the line below it will fail to recognize a newline char. With multiple hashes, this will fail. However, when submitting one hash, this line will not cause an issue.Line
$data = stream_get_line($file, 1024, $lineSeparator);
will cause an issue, because here only 1024 chars of the hashlist will be read.A beter solution would be just to keep reading until a newline char was found.
And
Those fixes work, but if there is no lineseperator in there it should still get the whole line.