Please note, this is a STATIC archive of website hashcat.net from October 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.

hashcat Forum

Full Version: Problem with token length exceptions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

I'm still fairly new to cracking hashes and im looking for a bit of advice on a project I'm working on for my final year project at university. So I'm attempting to create a small Beowulf cluster of 2-4 pc's with compatible hardware for cracking md5 hashes. I'm using a few python libraries to *attempt* to do this and I'm having an issue with trying to run hashcat through python.

The following code works when running from a command line but when trying to run from the python script I get around 2100 token length exceptions. I shut the other nodes in the cluster down to see if that was causing the issue but no such luck.

Code:
hashcat32.exe -a 3 -m 0 -d 1 hashes.txt -1 ?l?d ?1?1?1?1?1?1?1?1?1 --increment

if anyone is proficient at python and can point out my mistakes then the section of code trying to run hashcat is here:


Code:
#pass arguments through the subprocess module to run hashcat
args = open('args.txt')
line = args.readline()
hashcatExe =subprocess.Popen(['path to hashcat directory']+line.split())


Is there anything obvious I should check to try and fix this? I'm thinking its a problem with my script more than anything but just wanted to rule out missing something obvious with my hashcat statement first. I'm aware there are wrappers which in hindsight would have probably been much easier to implement than this backwards method but that will have to be a future project looking into those.

I've checked for the common issues on the faq's but no luck so far!  It's pretty intimidating from first glance so if anyone has any advice I'm keen to learn!
make sure that the args.txt file only contains the arguments starting with -a 3 (not the binary "hashcat32.exe" too)

also make sure that the file "hashes.txt" only contains valid MD5 hashes

you can also debug it like this:
Code:
print ['path to hashcat directory'] + line.split ()

to see what the final command is
This worked perfectly! Thanks so much! 

(04-25-2019, 07:48 PM)philsmd Wrote: [ -> ]make sure that the args.txt file only contains the arguments starting with -a 3 (not the binary "hashcat32.exe" too)

also make sure that the file "hashes.txt" only contains valid MD5 hashes

you can also debug it like this:
Code:
print ['path to hashcat directory'] + line.split ()

to see what the final command is