mufeedvh / pdfrip

A multi-threaded PDF password cracking utility equipped with commonly encountered password format builders and dictionary attacks.
MIT License
589 stars 67 forks source link

Feature request: resumable jobs #17

Open bbuchalter opened 7 months ago

bbuchalter commented 7 months ago

As a user, I'd like to be able to stop a cracking job and restart it later, So I can not lose progress.

mufeedvh commented 7 months ago

Hey @bbuchalter, thank you for the feature suggestion. This is a much-needed feature, will implement this in the next release! :raised_hands:

Pommaq commented 6 months ago

This can probably be done by expanding the current Producer interface to have "serialize" and "deserialize" functions (But I think it would be better to add a 2nd trait to avoid bloating). Then catching upon ctrl_c/other signals we serialize the producer to disk. Finally just add a paremeter/separate mode to resume operations or something.

I imagine the abort logic itself can be implemented using tools from Tokio. Select! macro, signal handling, channels, a small wrapper and a CancellationToken should be enough for this. Then the issue would be to port pdfrip to be async however

mufeedvh commented 6 months ago

@Pommaq, yes serializing the state to disk seems like the optimal approach here. Leaving some relevant links for future reference during implementation: