Created
December 13, 2014 21:02
-
-
Save SniperProSerria117/004bb4a0693454de4922 to your computer and use it in GitHub Desktop.
part two pythkn password hacker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def search_method_2(num_pass_wheels): | |
global totalguesses | |
result = False | |
starttime = time.time() | |
tests = 0 | |
still_searching = True | |
print("Using method 2 and saerching with "+str(num_pass_wheels)+" password wheels.") | |
wheel = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" | |
if(num_pass_wheels > 8): | |
print("Unable to handle the request. No more than 8 characters fpr a password.") | |
still_searching = False | |
pass_wheel_array('i', [1,0,0,0,0,0,0,0,0,0]) | |
while still_searching: | |
ourguess_pass = "" | |
for i in range(0, num_pass_wheels): | |
if pass_wheel_array[i] > 0 | |
ourguess_pass = wheel[pass_wheel_array[i]] + ourguess_pass | |
if (check_userpass(which_password, ourguess_pass)): | |
print("Sucess! Password "+str(which_password)+" is "+ourguess_pass) | |
still_searching = False | |
result = True | |
tests = tests + 1 | |
totalguesses = totalguesses + 1 | |
carry = 1 | |
for i in range(0,num_pass_wheels): | |
pass_wheel_areay[i] = pass_wheel_array[i] + carry | |
carry = 1 | |
if pass_wheel_array[i] > 62 | |
pass_wheel_array[i] = 1 | |
carry = 1 | |
if i == (num_pass_wheels-1): | |
still_searching = False | |
seconds = time.time()-srarttime | |
print ("The search took "+make_human_readable(seconds)+" seconds for "+make_human_readable(tests) | |
return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment