wificurse

wifi jamming tool
git clone git://git.2f30.org/wificurse
Log | Files | Refs | README | LICENSE

commit 16b250cbaa90cdb4c81d83db7e5bf6cf08e0142e
parent 0f4111546201d793018a7bb1b798c32400424cad
Author: oblique <psyberbits@gmail.com>
Date:   Sat, 12 May 2012 15:56:56 +0300

minor bug fixes

Diffstat:
Msrc/wificurse.c | 4+++-
Msrc/wificurse.h | 1+
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/wificurse.c b/src/wificurse.c @@ -65,6 +65,7 @@ int send_deauth(struct iw_dev *dev, struct access_point *ap) { /* send deauth */ deauth->sc.sequence = ap->sequence++; + ap->sequence %= 4096; do { r = iw_write(dev, deauth, sizeof(*deauth) + sizeof(*reason)); } while (r == 0); @@ -97,7 +98,8 @@ int read_ap_info(struct iw_dev *dev, struct ap_info *api) { beacon = (struct mgmt_frame*)pkt; /* if it's a beacon packet */ - if (beacon->fc.subtype == FRAME_CONTROL_SUBTYPE_BEACON) { + if (beacon->fc.type == FRAME_CONTROL_TYPE_MGMT_FRAME + && beacon->fc.subtype == FRAME_CONTROL_SUBTYPE_BEACON) { memcpy(api->bssid, beacon->bssid, IFHWADDRLEN); beacon_fb = (struct beacon_frame_body*)beacon->frame_body; beacon_ie = (struct info_element*)beacon_fb->infos; diff --git a/src/wificurse.h b/src/wificurse.h @@ -41,6 +41,7 @@ struct frame_control { uint8_t order:1; } __attribute__((__packed__)); +#define FRAME_CONTROL_TYPE_MGMT_FRAME 0 #define FRAME_CONTROL_SUBTYPE_DEAUTH 12 #define FRAME_CONTROL_SUBTYPE_BEACON 8