From: gpuhash Date: Tue, 23 Feb 2016 18:31:18 +0000 (+0300) Subject: Fairly strict stamping of WPA salt components X-Git-Tag: v3.00-beta~229^2~1 X-Git-Url: https://www.flypig.org.uk/git/?a=commitdiff_plain;h=d56394c8497d95da2d4d044b9e41d660047d89bb;p=hashcat.git Fairly strict stamping of WPA salt components --- diff --git a/src/shared.c b/src/shared.c index d2beee6..804e5bc 100644 --- a/src/shared.c +++ b/src/shared.c @@ -10071,8 +10071,14 @@ int wpa_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf) } } - salt->salt_buf[10] = digest[1]; - salt->salt_buf[11] = digest[2]; + uint32_t *p0 = (uint32_t *) in.essid; + uint32_t c0 = 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); }