Browse Source

adding script for making fake aps.

master
Charles Reid 9 years ago
parent
commit
05e3982f68
  1. 34
      honeypot/make_ap.py
  2. 35
      honeypot/make_aps.py

34
honeypot/make_ap.py

@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
import sys
from scapy.all import *
import subprocess
name = "CIA Surveillance Van #"
total = 1000
subprocess.call(['ifconfig','wlan0','down'])
subprocess.call(['iwconfig','wlan0','mode','monitor'])
subprocess.call(['ifconfig','wlan0','up'])
broadcast = ":".join(["ff"]*6)
bssid = ":".join(["da"]*6)
radioTapHeader = RadioTap()
dot11Header = Dot11(addr1 = broadcast, addr2 = bssid, addr3 = bssid)
dot11BeaconHeader = Dot11Beacon(cap = 0x1104)
dot11Elt1 = Dot11Elt( ID=0, info = name)
dot11Elt2 = Dot11Elt( ID=1, info = "\x82\x84\x8b\x96\x24\x30\x48\x6c") # <-- security etc
dot11Elt3 = Dot11Elt( ID=3, info = "\x02") # <-- channel number
dot11Elt4 = Dot11Elt( ID=5, info = "\x00\x01\x00\x00")
pkt = radioTapHeader / dot11Header / dot11BeaconHeader / dot11Elt1 / dot11Elt2 / dot11Elt3 / dot11Elt4
print "Creating fake ap with ssid "+namename
sendp(pkt, iface="wlan0", count=total, inter=0.2)

35
honeypot/make_aps.py

@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
import sys
from scapy.all import *
import subprocess
name = "CIA Surveillance Van #"
total = 1000
subprocess.call(['ifconfig','wlan0','down'])
subprocess.call(['iwconfig','wlan0','mode','monitor'])
subprocess.call(['ifconfig','wlan0','up'])
broadcast = ":".join(["ff"]*6)
bssid = ":".join(["aa"]*6)
for i in range(total):
namename = name + "%s"%(i)
radioTapHeader = RadioTap()
dot11Header = Dot11(addr1 = broadcast, addr2 = bssid, addr3 = bssid)
dot11BeaconHeader = Dot11Beacon(cap = 0x1104)
dot11Elt1 = Dot11Elt( ID=0, info = namename)
dot11Elt2 = Dot11Elt( ID=1, info = "\x82\x84\x8b\x96\x24\x30\x48\x6c")
dot11Elt3 = Dot11Elt( ID=3, info = "\x0b")
dot11Elt4 = Dot11Elt( ID=5, info = "\x00\x01\x00\x00")
pkt = radioTapHeader / dot11Header / dot11BeaconHeader / dot11Elt1 / dot11Elt2 / dot11Elt3 / dot11Elt4
print "Creating fake ap with ssid "+namename
sendp(pkt, iface="wlan0", count=1) #total, inter=0.2)
time.sleep(0.1)
Loading…
Cancel
Save