Menu

Is there a way to limit search to numbers only

Help
2016-01-22
2018-04-24
  • Mohamed Hussain

    Mohamed Hussain - 2016-01-22

    I have made the password and know it is just numbers. Is there a way to make it search for numbers only.

     
  • Henning Noren

    Henning Noren - 2016-01-22

    Yes, you can restrict the search to a specific set of characters with the "--charset" argument. This means that if you run the following command, where the file you want to test is "test.pdf":

    pdfcrack -c0123456789 test.pdf

    or

    pdfcrack --charset=0123456789 test.pdf

    pdfcrack will then search for only passwords that contain the digits, as defined by the characterset given in the charset-argument. If you want to include spaces and other odd characters for the commandprompt you will of course need to escape those characters or handle it in some other way but for this simple case it will work without any issues.

    Kind Regards,
    Henning

     
  • Mohamed Hussain

    Mohamed Hussain - 2016-01-23

    Thank you very very much Henning, You're the best.

     
  • xanda escuyer

    xanda escuyer - 2016-03-28

    We have a similar question: our password is alphanumeric mixed with some special charcters such as .@#~%$&

    Having used -c.@#~%$& the password scope is restricted to these characters only. How do we build the command line args to include alphanumeric also?

    Thanks.

     
  • xanda escuyer

    xanda escuyer - 2016-03-28

    We forgot to mention the password is also mixed case.

     

    Last edit: xanda escuyer 2016-03-28
  • Henning Noren

    Henning Noren - 2016-03-28

    Just add them to the command line. It gets kinda long but should work just fine:
    -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.@#~%$&'

    Note that pdfcrack works with bruteforce so this long characterstring will take a very long time to get to any viable password-length unless you do some clever tricks to run it in parallell

     
  • xanda escuyer

    xanda escuyer - 2016-03-28

    Thank you so much for replying - very much appreciated.
    We have time! Besides we have only a single core 1.4GHz Mac PPC so parallel processing unlikely to help much (as we understand it).
    You never know - it may finish before we retire!!
    ;-)
    Thanks again.

     

    Last edit: xanda escuyer 2016-03-29
  • Hans1978

    Hans1978 - 2018-04-23

    @Henning Noren
    Which command line do i need, if the password is a birthday.
    e.g. 03.09.1965

     
  • Henning Noren

    Henning Noren - 2018-04-23

    As earlier, you limit the charset to the characters that exist in the pwd, so for matching everything with numbers and dots, you type:

    pdfcrack --charset=.0123456789 test.pdf

     
  • Hans1978

    Hans1978 - 2018-04-24

    @Henning Noren
    ok it works

    But the format to search has to be always only xx.xx.xxxx
    or even better xx.xx.19xx

    pdf crack searchs like this following format and the searching is very slowly.
    .941778...
    471.34....

     

Log in to post a comment.