simple python hack program

Solutions on MaxInterview for simple python hack program by the best coders in the world

showing results for - "simple python hack program"
Paula
05 Mar 2019
1import hashlib
2 
3flag = 0
4 
5pass_hash = input("md5 hash: ")
6 
7wordlist = input("File name: ")
8try:
9    pass_file = open(wordlist,"r")
10except:
11    print("No file found :(")
12    quit()
13 
14for word in pass_file:
15 
16    enc_wrd =word.encode('utf-8')
17    digest =hashlib.md5(enc_wrd.strip()).hexdigest()
18    # print(word)
19    # print(digest)
20    # print(pass_hash)
21    if digest.strip() == pass_hash.strip():
22        print("password found")
23        print("Password is " + word)
24        flag = 1
25        break
26 
27if flag == 0:
28    print("password not in list")
29