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: Exit status code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good day!

I’m making a program that works with haschat (python). And I wanna know what exit code would be after hashcat worked. There’s a file with exit status codes in haschat/doc, but in haschat.logfile there is no information about exit status code. Please, help me to find exit status’s code after haschat working.
here we just need to distinguish between the process exit code ($? variable) and the status that hashcat internally uses:
1. if you check the process exit code, you need to follow this list: https://github.com/hashcat/hashcat/blob/..._codes.txt
2. if you look into the file hashcat.log instead, you will see entries with "status-after-work" and it should follow this list: https://github.com/hashcat/hashcat/blob/...#L199-L211

as you can see the internal state is more detailed and there are more possibilities. Not all of them make sense to expose into the $? process exit code, therefore the lists are different.
(07-16-2020, 11:27 AM)philsmd Wrote: [ -> ]here we just need to distinguish between the process exit code ($? variable) and the status that hashcat internally uses:
1. if you check the process exit code, you need to follow this list: https://github.com/hashcat/hashcat/blob/..._codes.txt
2. if you look into the file hashcat.log instead, you will see entries with "status-after-work" and it should follow this list: https://github.com/hashcat/hashcat/blob/...#L199-L211

as you can see the internal state is more detailed and there are more possibilities. Not all of them make sense to expose into the $? process exit code, therefore the lists are different.


Speaking about 1. Status codes. Where should I find these codes in hashcat? Maybe some file or what?
no, this code is returned directly from the process, your shell is able to give you the results:

linux
Code:
hashcat example0.hash example.dict

echo $?


on windows it seems to be this: https://stackoverflow.com/questions/3348...890#334890

there are of course libraries and also python modules/libs (e.g. https://docs.python.org/3/library/subprocess.html , see returncode etc)