lakiw / pcfg_cracker

Probabilistic Context Free Grammar (PCFG) password guess generator
314 stars 68 forks source link

UUID Mismatch #31

Open superevr opened 1 year ago

superevr commented 1 year ago

I'm getting a UUID error when trying to restore a session.

python3 trainer.py -t cracked.txt -r CRACKED

...
python3 pcfg_guesser.py -r CRACKED -s SESSION1 > /tmp/output1.txt
q [enter]
...
python3 pcfg_guesser.py -s SESSION1 --load > /tmp/output2.txt

Restoring previous session: SESSION1
Error: The UUID of the save file and the loaded rules do not match
       This normally happens if you retrain a ruleset and then try to restore an old session
       Expected UUID: fb55f40d-e7da-4a6a-bb3e-cc19cef2a393
       Found UUID: 384adebf-ba38-4307-891d-5b4a0a02178b
lakiw commented 1 year ago

I have a solution for your problem, but first let me say thank you very much for posting this issue! The solution is a "it works for me" vs. being intuitive so you highlighting this brought it to my attention since I guarantee others have had this problem before.

Current solution: Include the Rule setting (--rule) when restoring a session.

Example: python3 pcfg_guesser.py -s SESSION1 --load -r CRACKED

Plans for the future: 1) I need to include the rule file info in the saved file to make restoring sessions easier. I'll keep this issue open until I do this to remind me.

So once again thank you and if this short term solution does not work let me know.

superevr commented 1 year ago

Thank you! That worked The issue was the documentation: https://github.com/lakiw/pcfg_cracker/blob/6fed1047838091edec7ce96679c3d0887073ed3b/readme.md?plain=1#L57-L58

lakiw commented 1 year ago

Good catch, and my apologies. Just pushed a fix. Will review the full developers documentation later to make sure I didn't have that typo there as well. As I mentioned earlier, I'm going to leave this issue open until I add the rule info into the save files since I think that's a good quality of life item to have.