mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 08:08:10 +00:00
Fixed duplicate detection for WPA handshakes with the same ESSID
https://github.com/hashcat/hashcat/issues/955
This commit is contained in:
parent
edb7ae5658
commit
5ea24d9bca
@ -26,6 +26,7 @@
|
||||
- Fixed DEScrypt cracking in BF mode in case the hashlist contains more than 16 times the same salt
|
||||
- Fixed use of option --keyspace in combination with -m 2500 (WPA)
|
||||
- Fixed rule 'O' (RULE_OP_MANGLE_OMIT) in host mode in case the offset + length parameter equals the length of the input word
|
||||
- Fixed duplicate detection for WPA handshakes with the same ESSID
|
||||
|
||||
* changes v3.20 -> v3.30:
|
||||
|
||||
|
10
src/hashes.c
10
src/hashes.c
@ -63,19 +63,13 @@ int sort_by_salt (const void *v1, const void *v2)
|
||||
|
||||
if (res2 != 0) return (res2);
|
||||
|
||||
u32 n;
|
||||
|
||||
n = 16;
|
||||
|
||||
while (n--)
|
||||
for (int n = 0; n < 16; n++)
|
||||
{
|
||||
if (s1->salt_buf[n] > s2->salt_buf[n]) return 1;
|
||||
if (s1->salt_buf[n] < s2->salt_buf[n]) return -1;
|
||||
}
|
||||
|
||||
n = 8;
|
||||
|
||||
while (n--)
|
||||
for (int n = 0; n < 8; n++)
|
||||
{
|
||||
if (s1->salt_buf_pc[n] > s2->salt_buf_pc[n]) return 1;
|
||||
if (s1->salt_buf_pc[n] < s2->salt_buf_pc[n]) return -1;
|
||||
|
@ -29,29 +29,12 @@ int sort_by_hash_t_salt (const void *v1, const void *v2)
|
||||
const salt_t *s1 = h1->salt;
|
||||
const salt_t *s2 = h2->salt;
|
||||
|
||||
// testphase: this should work
|
||||
u32 n = 16;
|
||||
|
||||
while (n--)
|
||||
for (int n = 0; n < 16; n++)
|
||||
{
|
||||
if (s1->salt_buf[n] > s2->salt_buf[n]) return ( 1);
|
||||
if (s1->salt_buf[n] > s2->salt_buf[n]) return 1;
|
||||
if (s1->salt_buf[n] < s2->salt_buf[n]) return -1;
|
||||
}
|
||||
|
||||
/* original code, seems buggy since salt_len can be very big (had a case with 131 len)
|
||||
also it thinks salt_buf[x] is a char but its a u32 so salt_len should be / 4
|
||||
if (s1->salt_len > s2->salt_len) return ( 1);
|
||||
if (s1->salt_len < s2->salt_len) return -1;
|
||||
|
||||
u32 n = s1->salt_len;
|
||||
|
||||
while (n--)
|
||||
{
|
||||
if (s1->salt_buf[n] > s2->salt_buf[n]) return ( 1);
|
||||
if (s1->salt_buf[n] < s2->salt_buf[n]) return -1;
|
||||
}
|
||||
*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -64,12 +47,11 @@ int sort_by_hash_t_salt_hccap (const void *v1, const void *v2)
|
||||
const salt_t *s2 = h2->salt;
|
||||
|
||||
// last 2: salt_buf[10] and salt_buf[11] contain the digest (skip them)
|
||||
// 9 * 4 = 36 bytes (max length of ESSID)
|
||||
|
||||
u32 n = 9; // 9 * 4 = 36 bytes (max length of ESSID)
|
||||
|
||||
while (n--)
|
||||
for (int n = 0; n < 9; n++)
|
||||
{
|
||||
if (s1->salt_buf[n] > s2->salt_buf[n]) return ( 1);
|
||||
if (s1->salt_buf[n] > s2->salt_buf[n]) return 1;
|
||||
if (s1->salt_buf[n] < s2->salt_buf[n]) return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user