python3 pdf_brute.py
time cat /tmp/brute.txt | xargs -I{} -P 10 bash -c "qpdf --password={} --decrypt stmt.pdf out.pdf"
watch ls
PS: Just use JohnTheRipper or something.
| import datetime | |
| import re | |
| from itertools import product | |
| from string import ascii_lowercase | |
| import requests | |
| # create a list of possible names | |
| names_list = requests.get('http://ix.io/2u5u').text.splitlines() | |
| names = [n[0:5] for n in names if re.match(r'[a-z]{4,}', n)] | |
| # in case you need a bigger sample set, use this | |
| keywords = list(map(''.join, product(ascii_lowercase, repeat=4))) | |
| # create all possible ddmm dates, while accounting for leap years | |
| base = datetime.datetime.today() | |
| date_list = [base - datetime.timedelta(days=x) for x in range(5*366)] # coz why not | |
| dates = set(d.strftime('%d%m') for d in date_list) | |
| # create possible wordlist | |
| with open('/tmp/brute.txt', 'a') as f: | |
| for name in names: | |
| for date in dates: | |
| print(f'{name}{date}', file=f) |