user2010956
user2010956

Reputation: 31

Starting John the Rippper via a python script

So yeah, I've been working on a python script that extracts the password hash from a Mac. Now I wanna take it to the next level, crack it. After some quick research i found John the Ripper(http://www.openwall.com/john/) and decided to try and use that. (Note: I have tried other softwares, but none of them have been able to crack my test-hash. The problem is, when i try to start john the ripper, it fails me. (Im using some custom mac 1.7.3 version, haven't tried updating yet and I would prefer not to) Current script(after about 1 000 000 changes and retries:

output__ = "1dc74ff22b199305242d62f76f6a5c5c47b4c2e3"
print output__
txt = file('john/sha1.txt','wt')
sha1textfile = "%s:%s" % (output2[0], output__)
txt.write(sha1textfile)
txt2 = file('startjohn.command', 'wt')
stjtextfile = """
#!/bin/bash
cd /hax/john
./run/john sha1.txt
"""
txt2.write(stjtextfile)
shell('chmod 777 startjohn.command')
shell('open startjohn.command')

Now I the error i get is:

/hax/startjohn.command ; exit;
My-MacBook:~ albertfreakman$ /hax/startjohn.command ; exit;
No password hashes loaded
logout

Help me solve this problem and save me from insanity! Sincerely, Duke.

Some quick notes:

  1. Output__ is my test hash, already got the extract hash part working.
  2. If you have a solution that uses any other Hashcracker than John, thats even better! As long as it can either use a wordlist, or bruteforce.
  3. The hash is SHA1

Thanks!

Upvotes: 1

Views: 4303

Answers (1)

user2010956
user2010956

Reputation: 31

Okay I found the problem, my test hash didn't have CAPITAL LETTERS and therefore weren't accepted by john the ripper.

Upvotes: 1

Related Questions