It looks like you're new here. If you want to get involved, click one of these buttons!
#!/usr/bin/env python
'''
Crackhead version 1.0
MD5 dictionary attacker
Author: chroniccommand
poison.teamxpc.com ; iexploit.org ; haxme.org ; team-xpc.com
'''
import optparse, sys, hashlib
parser = optparse.OptionParser()
Options = optparse.OptionGroup(parser, 'Options') #Thanks Nero
parser.add_option('-k', '--hash',
action=\"store\", type=\"string\", help=\"MD5 hash\", metavar=\"HASH\")
parser.add_option('-w', '--wordlist',
action='store', type='string', help=\"Wordlist file\", metavar=\"WLIST\")
parser.add_option('-v', '--verbose',
action=\"store_true\", help=\"Turn verbose mode on\")
parser.add_option_group(Options)
(opts, args) = parser.parse_args()
if len(sys.argv) < 3:
print(\"Usage: %s -k hash -w /path/to/wordlist.txt\" % sys.argv[0])
print(\"\"\"
Options:
-k, --hash MD5 hash
-w, --wordlist Your wordlist file
-v, --verbose Turn verbose mode on
Crackhead version 1.0
\"\"\")
sys.exit()
def wlist(hash):
tryhash = hashlib.md5(hash).hexdigest()
if opts.verbose: print(\"Trying password %s\" % word)
if tryhash == opts.hash:
print(\"Plaintext found!\")
print(\"Plaintext: \" + word)
try:
wordfile = open(opts.wordlist, 'r')
curwords = wordfile.readlines()
current = 0
while current < len(curwords):
curwords[current] = curwords[current].strip()
current = current + 1
except IOError:
print(\"Could not find your wordlist file. Exiting...\")
sys.exit()
if opts.hash and opts.wordlist:
for word in curwords:
wlist(word.replace(\"\n\",\"\"))
else:
print(\"Usage: %s -k hash -w /path/to/wordlist.txt\")
sys.exit()