wps pin calculator


SUBMITTED BY: shaberu

DATE: Sept. 27, 2015, 4:28 p.m.

FORMAT: Python console session

SIZE: 629 Bytes

HITS: 1226

  1. '''
  2. Shaberu
  3. '''
  4. import sys
  5. VERSION = 1
  6. SUBVERSION = 0
  7. def usage():
  8. print "[+] WPSpin %d.%d " % (VERSION, SUBVERSION)
  9. print "[*] Usage : python WPSpin.py 123456"
  10. sys.exit(0)
  11. def wps_pin_checksum(pin):
  12. accum = 0
  13. while(pin):
  14. accum += 3 * (pin % 10)
  15. pin /= 10
  16. accum += pin % 10
  17. pin /= 10
  18. return (10 - accum % 10) % 10
  19. try:
  20. if (len(sys.argv[1]) == 6):
  21. p = int(sys.argv[1] , 16) % 10000000
  22. print "[+] WPS pin might be : %07d%d" % (p, wps_pin_checksum(p))
  23. else:
  24. usage()
  25. except Exception:
  26. usage()

comments powered by Disqus