Skip to content
Browse files

fixed bug that prevented deauth from working with -c option

  • Loading branch information...
1 parent 16d4b97 commit fcf8837512f1306c2792ffd729812c2c49f1668b DanMcInerney committed
Showing with 15 additions and 4 deletions.
  1. +7 −1 README.md
  2. +8 −3 wifijammer.py
View
8 README.md
@@ -20,6 +20,12 @@ This will find the most powerful wireless interface and turn on monitor mode. If
Upon hopping to a new channel it will identify targets that are on that channel and send 1 deauth packet to the client from the AP, 1 deauth to the AP from the client, and 1 deauth to the AP destined for the broadcast address to deauth all clients connected to the AP. Many APs ignore deauths to broadcast addresses.
+```shell
+python wifijammer.py -a 00:0E:DA:DE:24:8E
+```
+
+Deauthenticate all devices with which 00:0E:DA:DE:24:8E communicates. This would mainly be an access point's MAC so all clients associated with that AP would be deauthenticated, but you can also put a client MAC here to target that one client and any other devices that communicate with it.
+
### Advanced
```shell
@@ -47,7 +53,7 @@ The -m option sets a max number of client/AP combos that the script will attempt
All options:
```shell
-python wifijammer.py [-c CHANNEL] [-d] [-i INTERFACE] [-m MAXIMUM] [-n] [-p PACKETS] [-s SKIP] [-t TIME INTERVAL]
+python wifijammer.py [-a AP MAC] [-c CHANNEL] [-d] [-i INTERFACE] [-m MAXIMUM] [-n] [-p PACKETS] [-s SKIP] [-t TIME INTERVAL]
```
### To do
View
11 wifijammer.py
@@ -170,7 +170,7 @@ def channel_hop(mon_iface, args):
output(err, monchannel)
if args.channel:
- time.sleep(.1)
+ time.sleep(.05)
else:
# For the first channel hop thru, do not deauth
if first_pass == 1:
@@ -287,7 +287,7 @@ def cb(pkt):
# Check if it's added to our AP list
if pkt.haslayer(Dot11Beacon) or pkt.haslayer(Dot11ProbeResp):
- APs_add(clients_APs, APs, pkt)
+ APs_add(clients_APs, APs, pkt, args.channel)
# Ignore all the noisy packets like spanning tree
if noise_filter(args.skip, pkt.addr1, pkt.addr2):
@@ -297,7 +297,7 @@ def cb(pkt):
if pkt.type in [1, 2]:
clients_APs_add(clients_APs, pkt.addr1, pkt.addr2)
-def APs_add(clients_APs, APs, pkt):
+def APs_add(clients_APs, APs, pkt, chan_arg):
ssid = pkt[Dot11Elt].info
bssid = pkt[Dot11].addr3
try:
@@ -307,6 +307,11 @@ def APs_add(clients_APs, APs, pkt):
chans = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11']
if ap_channel not in chans:
return
+
+ if chan_arg:
+ if ap_channel != chan_arg:
+ return
+
except Exception as e:
return

0 comments on commit fcf8837

Please sign in to comment.
Something went wrong with that request. Please try again.