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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have made the password and know it is just numbers. Is there a way to make it search for numbers only.
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
Thank you very very much Henning, You're the best.
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.
We forgot to mention the password is also mixed case.
Last edit: xanda escuyer 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
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
@Henning Noren
Which command line do i need, if the password is a birthday.
e.g. 03.09.1965
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
@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....