Advertisement
Guest User

Untitled

a guest
May 4th, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #!/usr/bin/env python
  2. import socket
  3.  
  4. rawSocket = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(0x0003))
  5. rawSocket.bind(("mon0", 0x0003))
  6.  
  7. ap_list = set()
  8.  
  9. while True :
  10. pkt = rawSocket.recvfrom(2048)[0]
  11. if pkt[26] == "\x80" :
  12. if pkt[36:42] not in ap_list and ord(pkt[63]) > 0:
  13. ap_list.add(pkt[36:42])
  14. print "SSID: %s AP MAC: %s" % (pkt[64:64 +ord(pkt[63])], pkt[36:42].encode('hex'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement