Update hccapx format to version 4

pull/1125/head
jsteube 7 years ago
parent 2dd027af65
commit 9b08d4af0f

@ -789,7 +789,7 @@ typedef struct wpa
u32 pke[25];
u32 eapol[64 + 16];
u16 eapol_len;
u8 authenticated;
u8 message_pair;
u8 keyver;
u8 orig_mac_ap[6];
u8 orig_mac_sta[6];

@ -177,7 +177,7 @@ typedef struct wpa
u32 pke[25];
u32 eapol[64 + 16];
u16 eapol_len;
u8 authenticated;
u8 message_pair;
u8 keyver;
u8 orig_mac_ap[6];
u8 orig_mac_sta[6];
@ -812,6 +812,7 @@ typedef struct struct_psafe2_hdr
} psafe2_hdr;
#define HCCAPX_VERSION 4
#define HCCAPX_SIGNATURE 0x58504348 // HCPX
// this is required to force mingw to accept the packed attribute
@ -821,7 +822,7 @@ struct hccapx
{
u32 signature;
u32 version;
u8 authenticated;
u8 message_pair;
u8 essid_len;
u8 essid[32];
u8 keyver;

@ -2715,7 +2715,7 @@ int wpa_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED
if (in.signature != HCCAPX_SIGNATURE) return (PARSER_HCCAPX_SIGNATURE);
if (in.version != 3) return (PARSER_HCCAPX_VERSION);
if (in.version != HCCAPX_VERSION) return (PARSER_HCCAPX_VERSION);
if (in.eapol_len < 1 || in.eapol_len > 255) return (PARSER_HCCAPX_EAPOL_LEN);
@ -2780,7 +2780,7 @@ int wpa_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UNUSED
memcpy (wpa->orig_nonce_ap, in.nonce_ap, 32);
memcpy (wpa->orig_nonce_sta, in.nonce_sta, 32);
wpa->authenticated = in.authenticated;
wpa->message_pair = in.message_pair;
wpa->keyver = in.keyver;
@ -14857,7 +14857,7 @@ void to_hccapx_t (hashcat_ctx_t *hashcat_ctx, hccapx_t *hccapx, const u32 salt_p
memset (hccapx, 0, sizeof (hccapx_t));
hccapx->signature = HCCAPX_SIGNATURE;
hccapx->version = 3;
hccapx->version = HCCAPX_VERSION;
const salt_t *salt = &salts_buf[salt_pos];
@ -14868,7 +14868,7 @@ void to_hccapx_t (hashcat_ctx_t *hashcat_ctx, hccapx_t *hccapx, const u32 salt_p
wpa_t *wpas = (wpa_t *) esalts_buf;
wpa_t *wpa = &wpas[salt_pos];
hccapx->authenticated = wpa->authenticated;
hccapx->message_pair = wpa->message_pair;
hccapx->keyver = wpa->keyver;
hccapx->eapol_len = wpa->eapol_len;

@ -4930,7 +4930,7 @@ sub gen_hash
# format the binary output (.hccapx version 3)
#
my $HCCAPX_VERSION = 3;
my $HCCAPX_VERSION = 4;
# signature
$hash_buf = "HCPX";
@ -4939,7 +4939,7 @@ sub gen_hash
$hash_buf .= pack ("L<", $HCCAPX_VERSION);
# authenticated
$hash_buf .= pack ("C", 1);
$hash_buf .= pack ("C", 0);
# essid length
$essid_len = length ($salt_buf);

Loading…
Cancel
Save