Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/local/bin/python3
- from string import ascii_lowercase
- from itertools import product
- tab = " azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN0123456789_$&#@"
- password = "souris"
- login = input("Give me an interesting input\n")
- nblog = len(login)
- nbpass = len(password)
- sum = 1
- n = min(nblog, nbpass)
- charset = 'azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN0123456789_$&#@'
- def solve_password(password, maxrange):
- for i in range(maxrange):
- for attempt in product(charset, repeat=i):
- #print("index1 : ", tab.index(complete_list[i]))
- index1=tab.index(attempt[i]) + 10
- #print("index2 : ", tab.index(password[i]))
- index2=tab.index(password[i]) + 10
- sum=sum+(index1*n*(i+1))*(index2*(i+1)*(i+1))
- print("sum : ", sum)
- if sum == 3696619 :
- print("Password trouve : ", attempt)
- solved = solve_password(login, n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement