what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

wpacrack.py.txt

wpacrack.py.txt
Posted Jul 10, 2008
Authored by d3hydr8 | Site darkc0de.com

Python script that cracks a 256-bit WPA-PSK hash (64 char) using wpa_passphrase and a wordlist.

tags | tool, scanner, python
systems | unix
SHA-256 | 64f83af457754e31a3d03e207fb755e633bab664fab632e28121f6d198cb0ca0

wpacrack.py.txt

Change Mirror Download
#!/usr/bin/python
#Cracks a 256-bit WPA-PSK hash (64 char) using wpa_passphrase
#and a wordlist.

#This uses the linux tool wpa_passphrase to generate a 256-bit PSK.
#Make sure you have this tool prier to using this cracker.

#d3hydr8@linuxbox:~$ man wpa_passphrase
#d3hydr8@linuxbox:~$ wpa_passphrase <ssid> <paraphrase>

#Check the /etc/network/interfaces file for this hash. It will look something like this.

#auto lo
#iface lo inet loopback

#iface eth1 inet dhcp
#wpa-psk 11f3833adac3ed17ad05031c18170597ae0f911eed618927513c5d40a800b9d8
#wpa-driver wext
#wpa-key-mgmt WPA-PSK
#wpa-proto WPA
#wpa-ssid darkc0de

#auto eth1

#Hash: 11f3833adac3ed17ad05031c18170597ae0f911eed618927513c5d40a800b9d8

#http://www.darkc0de.com
#d3hydr8[at]gmail[dot]com

import md5, sys, commands, getopt, StringIO, re

def gethash(word):
cmd = "wpa_passphrase "+sys.argv[2]+" "+word
out = StringIO.StringIO(commands.getstatusoutput(cmd)[1]).read()
hash = re.findall("[a-f0-9]"*64,out)
if len(hash) > 0:
return hash[0]

if len(sys.argv) != 4:
print "Usage: ./wpacrack.py <hash> <ssid> <wordlist>"
sys.exit(1)

if len(sys.argv[1]) != 64:
print "\nError: Hash length incorrect (64 char)\n"
sys.exit(1)

try:
words = open(sys.argv[3], "r").readlines()
except(IOError):
print "\nError: Check your wordlist path\n"
sys.exit(1)

print "\n",len(words),"words loaded..."
for word in words:
hash = gethash(word.replace("\n",""))
if sys.argv[1] == hash:
print "Password is:",word






Login or Register to add favorites

File Archive:

October 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    39 Files
  • 2
    Oct 2nd
    23 Files
  • 3
    Oct 3rd
    18 Files
  • 4
    Oct 4th
    20 Files
  • 5
    Oct 5th
    0 Files
  • 6
    Oct 6th
    0 Files
  • 7
    Oct 7th
    17 Files
  • 8
    Oct 8th
    66 Files
  • 9
    Oct 9th
    25 Files
  • 10
    Oct 10th
    20 Files
  • 11
    Oct 11th
    21 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    0 Files
  • 15
    Oct 15th
    0 Files
  • 16
    Oct 16th
    0 Files
  • 17
    Oct 17th
    0 Files
  • 18
    Oct 18th
    0 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    0 Files
  • 22
    Oct 22nd
    0 Files
  • 23
    Oct 23rd
    0 Files
  • 24
    Oct 24th
    0 Files
  • 25
    Oct 25th
    0 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close