|
1 |
| -# Open-password-protected-file-using-python |
| 1 | + |
| 2 | +# Open Password Protected File Using Python. |
| 3 | + |
| 4 | +In this project, you can crack any PDF file without password and wordlist. |
| 5 | + |
| 6 | +let's start............... |
| 7 | + |
| 8 | +To make this project you need to follow this step:- |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +## Installation |
| 20 | + |
| 21 | +Install package with pip |
| 22 | + |
| 23 | +```bash |
| 24 | +pip install pikepdf |
| 25 | +pip install colorama |
| 26 | +pip install itertools |
| 27 | + |
| 28 | +``` |
| 29 | + |
| 30 | +## Deployment |
| 31 | + |
| 32 | +To deploy this project run |
| 33 | + |
| 34 | +```bash |
| 35 | +#please subscribe "Problem Solve With Ridoy" youtube channel |
| 36 | + |
| 37 | +import pikepdf |
| 38 | +import time |
| 39 | +from colorama import Fore |
| 40 | +from string import * |
| 41 | +from itertools import product |
| 42 | + |
| 43 | +value = ascii_letters + digits + punctuation |
| 44 | + |
| 45 | +count = 0 |
| 46 | +start_time = time.time() |
| 47 | +for i in range(4,3,-1): |
| 48 | + for j in product(value, repeat = i): |
| 49 | + count += 1 |
| 50 | + word = "".join(j) |
| 51 | + print(Fore.RED+ f"\r{count} password trying but didn't match: {word}",end="") |
| 52 | + try: |
| 53 | + pikepdf.open("Your_PDF_File_Name.pdf", password=str(word)) |
| 54 | + end_time = time.time() |
| 55 | + print("\n") |
| 56 | + print(Fore.GREEN+f"Password found in {str(end_time-start_time)[:4]} second \nPassword is: ",end= "") |
| 57 | + print(Fore.BLUE+f"{word}") |
| 58 | + break |
| 59 | + except: |
| 60 | + continue |
| 61 | + |
| 62 | +print(Fore.LIGHTYELLOW_EX+ "Thank you") |
| 63 | +``` |
| 64 | +
|
| 65 | +
|
| 66 | +## |
| 67 | +
|
| 68 | +
|
| 69 | +
|
| 70 | +
|
| 71 | +
|
| 72 | +
|
| 73 | +
|
| 74 | +## You can follow me |
| 75 | +
|
| 76 | +Facebook:- https://www.facebook.com/problemsolvewithridoy/ |
| 77 | +
|
| 78 | +Linkedin:- https://www.linkedin.com/in/ridoyhossain/ |
| 79 | +
|
| 80 | +YouTube:- https://www.youtube.com/@problemsolvewithridoy |
| 81 | +
|
| 82 | + |
| 83 | +
|
| 84 | +If you have any confusion, please feel free to contact me. Thank you |
| 85 | +
|
0 commit comments