mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-27 02:18:21 +00:00
Merge pull request #237 from gpuhash/master
Fairly strict stamping of WPA salt components
This commit is contained in:
commit
31ee4e67d1
11
src/shared.c
11
src/shared.c
@ -10071,8 +10071,15 @@ int wpa_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
salt->salt_buf[10] = digest[1];
|
uint32_t *p0 = (uint32_t *) in.essid;
|
||||||
salt->salt_buf[11] = digest[2];
|
uint32_t c0 = 0;
|
||||||
|
uint32_t c1 = 0;
|
||||||
|
|
||||||
|
for (unsigned int i = 0; i < sizeof(in.essid)/sizeof(uint32_t); i++) c0 ^= *p0++;
|
||||||
|
for (unsigned int i = 0; i < sizeof(wpa->pke)/sizeof(wpa->pke[0]); i++) c1 ^= wpa->pke[i];
|
||||||
|
|
||||||
|
salt->salt_buf[10] = c0;
|
||||||
|
salt->salt_buf[11] = c1;
|
||||||
|
|
||||||
return (PARSER_OK);
|
return (PARSER_OK);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user