-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgohash.py
68 lines (58 loc) · 3.24 KB
/
gohash.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/python
# << CODE BY HUNXBYTS
# << MAU RECODE ??? IZIN DULU LAH , MINIMAL TAG AKUN GITHUB MIMIN YANG MENGARAH KE AKUN INI, LEBIH ENAKNYA SIH FORK
# << KALAU DI ATAS TIDAK DI IKUTI MAKA AKAN MENDAPATKAN DOSA KARENA MIMIN GAK IKHLAS
# “Wahai orang-orang yang beriman! Janganlah kamu saling memakan harta sesamamu dengan jalan yang batil,” (QS. An Nisaa': 29). Rasulullah SAW juga melarang umatnya untuk mengambil hak orang lain tanpa izin.
import requests
import json
from sys import stderr
import time
Bl='\033[30m' # VARIABLE COLOR
Re='\033[1;31m'
Gr='\033[1;32m'
Ye='\033[1;33m'
Blu='\033[1;34m'
Mage='\033[1;35m'
Cy='\033[1;36m'
Wh='\033[1;37m'
def banner():
stderr.writelines(f"""{Gr}
██████╗ ██████╗ ██╗ ██╗ █████╗ ███████╗██╗ ██╗
██╔════╝ ██╔═══██╗ ██║ ██║██╔══██╗██╔════╝██║ ██║
██║ ███╗██║ ██║█████╗███████║███████║███████╗███████║
██║ ██║██║ ██║╚════╝██╔══██║██╔══██║╚════██║██╔══██║
╚██████╔╝╚██████╔╝ ██║ ██║██║ ██║███████║██║ ██║
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
{Wh}<<------ {Gr}C O D E B Y H U N X {Wh}------>>
{Wh}< Hash identified >
""")
banner() #FUNCTION BANNER
try:
def function(): #FUNCTION HASH
api_url = 'https://hashes.com/en/api/identifier' #API HASHES
hash_input = input(f"\n {Wh}[{Gr}+{Wh}] {Gr}Enter Your Hash : {Wh}") #ENTER HASH
Query = {'hash': hash_input}
response = requests.get(api_url, params=Query) #GET REQUEST API
data = json.loads(response.text) #GET JSON CONVERT TEXT
if data ['success']: #SUCCESS
algorithms = data ['algorithms']
algoritm_hash = ', '.join(algorithms)
time.sleep(2)
print(f'\n {Wh}===================== {Ye}Show Algorithm Hash {Wh}====================')
print(f'\n {Wh}[{Gr}+{Wh}] {Gr}Hash :{Wh}', hash_input)
print(f' {Wh}[{Gr}+{Wh}] {Gr}Algorithm :{Ye}', algoritm_hash)
print(f'\n {Wh}==============================================================')
while True: # While Tools
time.sleep(2)
user_input = input(f"\n {Wh}Do you want to identify the hash again? {Gr}Y/N {Wh}:{Ye} ")
if user_input == 'Y' or user_input == 'y':
function()
elif user_input == 'N' or user_input == 'n':
print(f' {Re}Exit ToolS !!!')
break
else:
print(f' {Wh}[{Gr}!{Wh}] {Gr}Hash :{Re}', data['message']) #ERROR NOT FOUND HASH
if __name__ == "__main__":
function() #RUN FUNCTION FUNCTION()
except KeyboardInterrupt: #Keyboard CTRL + C, THEN EXIT!!
print(f"{Wh} stopped Program...")