Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #All of the functions we need come automatically with python but do need to be imported.
- import itertools
- import time
- import os
- #This is basically a list of all the different characters that will be tried.
- Alphabet = ("abcdefghijklmnopqrstuvwxzABCDEFGHIJKLMNOPQRSTUVWXZ123456789-_")
- #If you think you know approximatively the words inside your password, for example "thebigdog99" you can change the alphabet
- #Alphabet = ("the","THE","BIG","big","dog","DOG","99","banana") it will go trough the combination of all these words
- #This tells us how many combinations are used.
- counter = 1
- start = time.time()
- #This stops the program once it gets to 16 characters (most people would run out of patience WAY before that
- #I put 7,16 because i thought my password was between these two length, change accordingly
- for CharLength in range(7,16):
- #This finds all of the possible combinations of characters that are of the correct length.
- passwords = (itertools.product(Alphabet, repeat = CharLength))
- print("\n \n")
- print("currently working on passwords with ", CharLength, " chars")
- print("It has been ", time.time() - start, " seconds!")
- print("We have tried ", counter, " possible passwords!")
- #This is the way to print the products of generators.
- for i in passwords:
- #This increases the number of combinations tried by one to show that one more has been tried.
- counter += 1
- #As the itertools.products() returns a tuple, it has to be converted into a sting.
- i = str(i)
- #The parts that were added as a result of conversion from tuple have to be removed.
- i = i.replace("[", "")
- i = i.replace("]", "")
- i = i.replace("'", "")
- i = i.replace(" ", "")
- i = i.replace(",", "")
- i = i.replace("(", "")
- i = i.replace(")", "")
- #print(i)
- cmd = "aescrypt -d -p " + i +" filename.aes 2> nul"
- os.system(cmd)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement