mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-22 22:58:30 +00:00
Allow hashfile for -m 16800 to be used with -m 16801
This commit is contained in:
parent
6afe989bed
commit
8452930795
@ -17735,6 +17735,20 @@ int wpa_pmkid_pmk_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MA
|
|||||||
const int rc_tokenizer2 = input_tokenizer (input_buf, input_len, &token);
|
const int rc_tokenizer2 = input_tokenizer (input_buf, input_len, &token);
|
||||||
|
|
||||||
if (rc_tokenizer2 != PARSER_OK) return (rc_tokenizer);
|
if (rc_tokenizer2 != PARSER_OK) return (rc_tokenizer);
|
||||||
|
|
||||||
|
// essid
|
||||||
|
|
||||||
|
u8 *essid_buf = token.buf[3];
|
||||||
|
int essid_len = token.len[3];
|
||||||
|
|
||||||
|
u8 *essid_ptr = (u8 *) wpa_pmkid->essid_buf;
|
||||||
|
|
||||||
|
for (int i = 0, j = 0; i < essid_len; i += 2, j += 1)
|
||||||
|
{
|
||||||
|
essid_ptr[j] = hex_to_u8 (essid_buf + i);
|
||||||
|
}
|
||||||
|
|
||||||
|
wpa_pmkid->essid_len = essid_len / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// pmkid
|
// pmkid
|
||||||
@ -22047,23 +22061,53 @@ int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const size_t out_le
|
|||||||
|
|
||||||
wpa_pmkid_t *wpa_pmkid = &wpa_pmkids[digest_cur];
|
wpa_pmkid_t *wpa_pmkid = &wpa_pmkids[digest_cur];
|
||||||
|
|
||||||
snprintf (out_buf, out_len - 1, "%08x%08x%08x%08x*%02x%02x%02x%02x%02x%02x*%02x%02x%02x%02x%02x%02x",
|
if (wpa_pmkid->essid_len)
|
||||||
wpa_pmkid->pmkid[0],
|
{
|
||||||
wpa_pmkid->pmkid[1],
|
exec_hexify ((const u8*) wpa_pmkid->essid_buf, wpa_pmkid->essid_len, (u8 *) tmp_buf);
|
||||||
wpa_pmkid->pmkid[2],
|
|
||||||
wpa_pmkid->pmkid[3],
|
int tmp_len = wpa_pmkid->essid_len * 2;
|
||||||
wpa_pmkid->orig_mac_ap[0],
|
|
||||||
wpa_pmkid->orig_mac_ap[1],
|
tmp_buf[tmp_len] = 0;
|
||||||
wpa_pmkid->orig_mac_ap[2],
|
|
||||||
wpa_pmkid->orig_mac_ap[3],
|
snprintf (out_buf, out_len - 1, "%08x%08x%08x%08x*%02x%02x%02x%02x%02x%02x*%02x%02x%02x%02x%02x%02x:%s",
|
||||||
wpa_pmkid->orig_mac_ap[4],
|
wpa_pmkid->pmkid[0],
|
||||||
wpa_pmkid->orig_mac_ap[5],
|
wpa_pmkid->pmkid[1],
|
||||||
wpa_pmkid->orig_mac_sta[0],
|
wpa_pmkid->pmkid[2],
|
||||||
wpa_pmkid->orig_mac_sta[1],
|
wpa_pmkid->pmkid[3],
|
||||||
wpa_pmkid->orig_mac_sta[2],
|
wpa_pmkid->orig_mac_ap[0],
|
||||||
wpa_pmkid->orig_mac_sta[3],
|
wpa_pmkid->orig_mac_ap[1],
|
||||||
wpa_pmkid->orig_mac_sta[4],
|
wpa_pmkid->orig_mac_ap[2],
|
||||||
wpa_pmkid->orig_mac_sta[5]);
|
wpa_pmkid->orig_mac_ap[3],
|
||||||
|
wpa_pmkid->orig_mac_ap[4],
|
||||||
|
wpa_pmkid->orig_mac_ap[5],
|
||||||
|
wpa_pmkid->orig_mac_sta[0],
|
||||||
|
wpa_pmkid->orig_mac_sta[1],
|
||||||
|
wpa_pmkid->orig_mac_sta[2],
|
||||||
|
wpa_pmkid->orig_mac_sta[3],
|
||||||
|
wpa_pmkid->orig_mac_sta[4],
|
||||||
|
wpa_pmkid->orig_mac_sta[5],
|
||||||
|
tmp_buf);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
snprintf (out_buf, out_len - 1, "%08x%08x%08x%08x*%02x%02x%02x%02x%02x%02x*%02x%02x%02x%02x%02x%02x",
|
||||||
|
wpa_pmkid->pmkid[0],
|
||||||
|
wpa_pmkid->pmkid[1],
|
||||||
|
wpa_pmkid->pmkid[2],
|
||||||
|
wpa_pmkid->pmkid[3],
|
||||||
|
wpa_pmkid->orig_mac_ap[0],
|
||||||
|
wpa_pmkid->orig_mac_ap[1],
|
||||||
|
wpa_pmkid->orig_mac_ap[2],
|
||||||
|
wpa_pmkid->orig_mac_ap[3],
|
||||||
|
wpa_pmkid->orig_mac_ap[4],
|
||||||
|
wpa_pmkid->orig_mac_ap[5],
|
||||||
|
wpa_pmkid->orig_mac_sta[0],
|
||||||
|
wpa_pmkid->orig_mac_sta[1],
|
||||||
|
wpa_pmkid->orig_mac_sta[2],
|
||||||
|
wpa_pmkid->orig_mac_sta[3],
|
||||||
|
wpa_pmkid->orig_mac_sta[4],
|
||||||
|
wpa_pmkid->orig_mac_sta[5]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (hash_mode == 16900)
|
else if (hash_mode == 16900)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user