I'm trying to use John to recover some old ZIP files with a password I remember half. One half being a word, the latter half being a mix of four to six digits. I remember the word, but not the digits after it, what line of code/command can I enter for John to start with the right password, then only to find the right number combination?

1 Answer 1


A mask attack would be the simplest way - you can use ?d to represent an unknown digit. So something like this for four digits:

john input.txt --mask="word?d?d?d?d"

And then adding on more ?d for additional digits if needed.

  • It worked perfectly! Thanks a ton!!!
    – LEGEND-001
    Aug 20 at 21:33
  • 3
    @LEGEND-001 if this answered your question, you can click the green check mark to accept the answer Aug 21 at 7:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .