Skip to content

Commit

Permalink
Merge pull request hashcat#45 from jamazi/master
Browse files Browse the repository at this point in the history
handle 4addr in IEEE80211 packets properly in cap2hccapx.c
jsteube authored Jun 19, 2018
2 parents 98aa85a + d650de0 commit 2791517
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/cap2hccapx.c
Original file line number Diff line number Diff line change
@@ -805,12 +805,8 @@ static void process_packet (const u8 *packet, const pcap_pkthdr_t *header)
{
// process header: ieee80211

int set = 0;

if (frame_control & IEEE80211_FCTL_TODS) set++;
if (frame_control & IEEE80211_FCTL_FROMDS) set++;

if (set != 1) return;
int addr4_exist = ((frame_control & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) ==
(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS));

// find offset to llc/snap header

@@ -828,6 +824,7 @@ static void process_packet (const u8 *packet, const pcap_pkthdr_t *header)
// process header: the llc/snap header

if (header->caplen < (llc_offset + sizeof (ieee80211_llc_snap_header_t))) return;
if (addr4_exist) llc_offset += 6;

ieee80211_llc_snap_header_t *ieee80211_llc_snap_header = (ieee80211_llc_snap_header_t *) &packet[llc_offset];

0 comments on commit 2791517

Please sign in to comment.