Scheduled checkpoint
#1
Hi, I have a hashcat session which works fine. I can perform manually a checkpoint and then restore the session and it continues at the same point, everything ok... now, Because of external reasons, that hashcat machine is powering up everyday at one hour and powering down at another different hour. I need to schedule between that hours to keep hashcat working.

Under this presented scenario, I know I can do some kind of cron job or task in order to start hashcat if it is not already launched to make it work again on powering up.... but, what about the powering down? To prevent loss of work I need to perform a checkpoint in hashcat before killing or stopping the process. Can be this scheduled in some way? Thanks in advance.
Reply
#2
Hashcat will automatically update the restore file as soon as a checkpoint is reached. If you do not want to lose any progress and have some control over the shutdown process you can monitor the restore file for writes and block the shutdown until a write has happened.
Reply
#3
Tongue 
hhmm.... thanks for the suggestion... but not sure how hashcat handle that automatic checkpoints... do you know how checkpoints policy works? can that be configured in any way?

What you say could be nice with enough time... but the pc is powering down all the days at same hour... hard to know if last checkpoint is going to be the last before the shutdown time.

I was trying stuff "beyond hashcat" ... i was trying to create a mkfifo in order to send a keystroke through it to try to emulate the "c" key pressing but it didn't worked... any other trick? i'm open to dirty tricks

Thanks!
Reply
#4
Solved... I'll let here the solution... maybe could be useful to somebody.

Finally I did it using screen.

For the hashcat stuff:
screen -S hashcat

Inside the screen session, launch your hashcat, in my case: hashcat --session test --restore

Then from other terminal launch: screen -S hashcat -X stuff 'c'

It works like a charm and this can be set in a script on any cron job. Regards
Reply