Cenzic 232 Patent
Paid Advertising
sla.ckers.org is
ha.ckers sla.cking
Sla.ckers.org
Whether this is about ha.ckers.org, sla.ckers.org or some other project you are interested in or want to talk about, throw it in here to get feedback. 
Go to Topic: PreviousNext
Go to: Forum ListMessage ListNew TopicSearchLog In
MySQL v5 Hash Wordlist Cracker
Posted by: d3hydr8
Date: January 26, 2009 12:01PM

Haven't been back here in a while. Wrote this code today for a friend and thought of this site. Glad to see your one of the few still alive.

#!/usr/bin/python
#Attempts to crack MySQL v5 hash using wordlist.
#http://darkc0de.com/
#d3hydr8[at]gmail[dot]com 

import sys

def c1(word):
	s = hashlib.sha1()
	s.update(word[:-1])
	s2 = hashlib.sha1()
	s2.update(s.digest())
	return s2.hexdigest()

def c2(word):
	s = sha.new()
	s.update(word[:-1])
	s2 = sha.new()
	s2.update(s.digest())
	return s2.hexdigest()
	
if len(sys.argv) != 3:
	print "Usage: ./mysql5crack.py <hash> <wordlist>"
	sys.exit(1)
	
pw = sys.argv[1]
if len(pw) != 40:
	print "Improper hash length\n"
  	sys.exit(1)
try:
  	words = open(sys.argv[2], "r")
except(IOError): 
  	print "Error: Check your wordlist path\n"
  	sys.exit(1)
words = words.readlines()
print "\nWords Loaded:",len(words)

try:
	import hashlib
	for word in words:
		if pw == c1(word): 
			print "\nPassword is:",word
except(ImportError):
	import sha
	for word in words:
		if pw == c2(word): 
			print "\nPassword is:",word

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

Options: ReplyQuote


Sorry, only registered users may post in this forum.