# Untitled

a guest
Nov 4th, 2019
137
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. #All of the functions we need come automatically with python but do need to be imported.
2. import itertools
3. import time
4. import os
5.
6. #This is basically a list of all the different characters that will be tried.
7. Alphabet = ("abcdefghijklmnopqrstuvwxzABCDEFGHIJKLMNOPQRSTUVWXZ123456789-_")
8.
9. #If you think you know approximatively the words inside your password, for example "thebigdog99" you can change the alphabet
10. #Alphabet = ("the","THE","BIG","big","dog","DOG","99","banana") it will go trough the combination of all these words
11.
12.
13.
14. #This tells us how many combinations are used.
15. counter = 1
16.
17. start = time.time()
18.
19. #This stops the program once it gets to 16 characters (most people would run out of patience WAY before that
20. #I put 7,16  because i thought my password was between these two length, change accordingly
21. for CharLength in range(7,16):
22.
23.     #This finds all of the possible combinations of characters that are of the correct length.
24.     passwords = (itertools.product(Alphabet, repeat = CharLength))
25.
26.
27.     print("\n \n")
28.     print("currently working on passwords with ", CharLength, " chars")
29.     print("It has been ", time.time() - start, " seconds!")
30.     print("We have tried ", counter, " possible passwords!")
31.
32.     #This is the way to print the products of generators.
34.
35.         #This increases the number of combinations tried by one to show that one more has been tried.
36.         counter += 1
37.
38.         #As the itertools.products() returns a tuple, it has to be converted into a sting.
39.         i = str(i)
40.
41.         #The parts that were added as a result of conversion from tuple have to be removed.
42.         i = i.replace("[", "")
43.         i = i.replace("]", "")
44.         i = i.replace("'", "")
45.         i = i.replace(" ", "")
46.         i = i.replace(",", "")
47.         i = i.replace("(", "")
48.         i = i.replace(")", "")
49.
50.         #print(i)
51.
52.         cmd = "aescrypt -d -p " + i +" filename.aes 2> nul"
53.         os.system(cmd)
RAW Paste Data