glv2 / bruteforce-salted-openssl

Try to find the password of a file that was encrypted with the 'openssl' command.
Other
205 stars 52 forks source link

Randomly hangs and destroys save state file, but continues to print status without errors #28

Closed oakwhiz closed 4 months ago

oakwhiz commented 4 months ago

Tested this program out and I've had this issue twice now:

I highly recommend logging & monitoring, and having a process that backs up the save state file, and tails the logs periodically to see if the current password has stopped advancing. This would be a signal to kill the process, try to restore the save state file, etc.

This is making it very difficult to run the search unattended, I'm curious if anyone has had a similar experience.

glv2 commented 4 months ago

I made some modifications (1c2bbc518d05c72a41c1a93200d810c20256eda3) that should solve a possible deadlock when saving the state file. Could you check if you can still reproduce the issue with the new code?

oakwhiz commented 4 months ago

I will report back on the progress with the patch applied. Average time to failure was about 4 hours roughly.

oakwhiz commented 4 months ago

I made some modifications (1c2bbc5) that should solve a possible deadlock when saving the state file. Could you check if you can still reproduce the issue with the new code?

So far there have been no issues. However there is a race condition in the -v output where the current password is completely blank. It seems to have a roughly 1% chance of occurring, while running with 8 worker threads.

glv2 commented 4 months ago

Thanks for testing. The blank password in the status output should be fixed with 32ee7cd06010908b36a1dee04b51762da47020b9.