Advertisement
teknoraver

sbiconatore

Jul 25th, 2014
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.00 KB | None | 0 0
  1. # radiotap+beacon packet template
  2. hex = "\x00\x00\x0e\x00\x0e\x00\x00\x00\x00\x0cq\t\xc0\x00\x80\x00\x00\x00\xff\xff\xff\xff\xff\xff............\x00\x92\x89D!!\x00\x00\x00\x00d\x00\x11\x04\x00\x01x\x01\x08\x82\x84\x8b\x96\x0c\x12\x18$\x03\x01\x01\x05\x04\x01\x02\x00\x002\x040H`l"
  3. beacon = RadioTap(hex)
  4.  
  5. # read a file with words to use as ESSID
  6. dict = open("/usr/share/dict/italian", "r")
  7. words = dict.read().split("\n")
  8. dict.close()
  9.  
  10. while True:
  11.     # set a fake but valid mac address
  12.     mac = [ random.randint(0x00, 0xff),
  13.         random.randint(0x00, 0xff),
  14.         random.randint(0x00, 0xff),
  15.         random.randint(0x00, 0xff),
  16.         random.randint(0x00, 0xff),
  17.         random.randint(0x00, 0xff) ]
  18.     mac[0] |= 2
  19.     mac[0] &= 0xfe
  20.     mac = ':'.join(map(lambda x: "%02x" % x, mac))
  21.     beacon.payload.addr2 = mac
  22.     beacon.payload.addr3 = mac
  23.  
  24.     # select the ESSID to a dictionary word
  25.     word = random.choice(words)
  26.     beacon.payload.payload.payload.info = word
  27.     beacon.payload.payload.payload.len = len(word)
  28.     sendp(beacon, iface="mon0")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement