SHOW:
|
|
- or go back to the newest paste.
1 | #!/usr/bin/python | |
2 | ||
3 | # simple hash cracker working with wordlist | |
4 | # just for Fun ! | |
5 | ||
6 | ''' | |
7 | ||
8 | 888b d888 .d8888b. | |
9 | 8888b d8888 d88P Y88b | |
10 | 88888b.d88888 888 888 | |
11 | 888Y88888P888 888 | |
12 | 888 Y888P 888 888 | |
13 | 888 Y8P 888 888 888 | |
14 | 888 " 888 Y88b d88P | |
15 | 888 888 "Y8888P" | |
16 | ||
17 | Coded by MatriX Coder from tunisia | |
18 | Use my code as you want :D | |
19 | ||
20 | ''' | |
21 | ||
22 | import hashlib , sys , os | |
23 | from platform import system | |
24 | ||
25 | if system() == 'Linux': | |
26 | os.system('clear') | |
27 | if system() == 'Windows': | |
28 | os.system('cls') | |
29 | ||
30 | logo = ''' | |
31 | ||
32 | __ __ __ | |
33 | / / / /_____________ ______/ /__ | ----| Hcrack |---- | |
34 | / /_/ / ___/ ___/ __ `/ ___/ //_/ | Author : MatriX Coder | |
35 | / __ / /__/ / / /_/ / /__/ ,< | FB : www.fb.com/matrixcoder2 | |
36 | /_/ /_/\___/_/ \__,_/\___/_/|_| | Blog : www.matrixcoder.co.vu | |
37 | ||
38 | ||
39 | ||
40 | Supported algo : md5 | sha1 | |
41 | [*] Usage : python '''+sys.argv[0]+''' hash algo wordlist.txt | |
42 | ''' | |
43 | ||
44 | print(logo) | |
45 | ||
46 | ||
47 | def md5(hash1 , pass1): | |
48 | crypted = hashlib.md5(pass1).hexdigest() | |
49 | if crypted != hash1: | |
50 | print(hash1 + ' != ' + str(crypted)) | |
51 | elif crypted == hash1: | |
52 | print('\t\n----> Cracked : ' + pass1 + '\n') | |
53 | exit() | |
54 | ||
55 | def sha1(hash1 , pass1): | |
56 | crypted = hashlib.sha1(pass1).hexdigest() | |
57 | if crypted != hash1: | |
58 | print(hash1 + ' != ' + str(crypted)) | |
59 | elif crypted == hash1: | |
60 | print('\t\n----> Cracked : ' + pass1 + '\n') | |
61 | exit() | |
62 | ||
63 | ||
64 | ||
65 | try: | |
66 | wordlist = sys.argv[3] | |
67 | sss = open(wordlist , 'rb') | |
68 | passes = sss.readlines() | |
69 | for pass1 in passes: | |
70 | pass1 = pass1.replace('\n' , '') | |
71 | algo = sys.argv[2] | |
72 | hash1 = sys.argv[1] | |
73 | if algo == 'md5': | |
74 | md5(hash1 , pass1) | |
75 | if algo == 'sha1': | |
76 | sha1(hash1 , pass1) | |
77 | except IndexError: | |
78 | pass |