0

Password

How would you write a program that would check how long it'd take to crack a password?

22nd Aug 2016, 7:43 PM
Pawel Dzikowicz
Pawel Dzikowicz - avatar
1 Resposta
+ 2
x = "0123456789QqWwEeRrTtYyUuIiOoPpAaSsDdFfGgHhJjKkLlZzXxCcVvBbNnMm+×÷=%_€£¥₩!@#$/^&*()-:;,?`~\|<>{}[]°•○●□■♤♡♢♧☆▪¤《》¡¿ " print("Please enter your password") a = input() o = 0 t = 1 for z in a[::-1]: o += t * (x.index(z) + 1) t *= len(x) if o>1: print("I should try " + str(o) + " times to crack it") else: print("I should try " + str(o) + " time to crack it")
8th Sep 2016, 10:32 PM
ali.gh
ali.gh - avatar