Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def passwordCombination(password, charset):
- print('Cracking password using cartesian product')
- cProduct = itertools.product(charSet, repeat= len(password))
- attempts = 0
- for i in cProduct:
- attempts += 1
- i = ''.join(i)
- if(i == password):
- print('Found password after attempts : ' + str(attempts) + ', password : ' + str(i))
- return
- else:
- print("Could not crack password")
- pass = 'frans'
- passwordCombination(pass, charSet)
Add Comment
Please, Sign In to add comment