mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-23 00:28:11 +00:00
Fixed parsing of hashes in case the last line did not include a linefeed character
This commit is contained in:
parent
e5e97c6ff8
commit
992bc01f3c
@ -32,6 +32,7 @@
|
|||||||
- Fixed infinite loop when using --loopback in case all hashes have been cracked
|
- Fixed infinite loop when using --loopback in case all hashes have been cracked
|
||||||
- Fixed kernel loops in --increment mode leading to slower performance
|
- Fixed kernel loops in --increment mode leading to slower performance
|
||||||
- Fixed mask length check in hybrid attack-modes: Do not include hash-mode dependant mask length checks
|
- Fixed mask length check in hybrid attack-modes: Do not include hash-mode dependant mask length checks
|
||||||
|
- Fixed parsing of hashes in case the last line did not include a linefeed character
|
||||||
- Fixed potfile loading to accept blank passwords
|
- Fixed potfile loading to accept blank passwords
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -58,21 +58,26 @@ int fgetl (FILE *fp, char *line_buf)
|
|||||||
|
|
||||||
if (line_len == 0) return 0;
|
if (line_len == 0) return 0;
|
||||||
|
|
||||||
if (line_buf[line_len - 1] == '\n')
|
while (line_len)
|
||||||
{
|
{
|
||||||
line_len--;
|
if (line_buf[line_len - 1] == '\n')
|
||||||
|
{
|
||||||
|
line_len--;
|
||||||
|
|
||||||
line_buf[line_len] = 0;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line_buf[line_len - 1] == '\r')
|
||||||
|
{
|
||||||
|
line_len--;
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line_len == 0) return 0;
|
line_buf[line_len] = 0;
|
||||||
|
|
||||||
if (line_buf[line_len - 1] == '\r')
|
|
||||||
{
|
|
||||||
line_len--;
|
|
||||||
|
|
||||||
line_buf[line_len] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (line_len);
|
return (line_len);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user