-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJavaEditChecker.py
More file actions
66 lines (52 loc) · 1.71 KB
/
JavaEditChecker.py
File metadata and controls
66 lines (52 loc) · 1.71 KB
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
try:
import requests
import hashlib
import colorama
import os
except ModuleNotFoundError:
os.system("pip install requests")
os.system("pip install hashlib")
os.system("pip install colorama")
from colorama import init, Fore as cc
dr = DR = r = R = cc.LIGHTRED_EX
g = G = cc.LIGHTGREEN_EX
c = C = cc.LIGHTCYAN_EX
y = Y = cc.LIGHTYELLOW_EX
w = W = cc.RESET
def clear():
os.system('cls')
def print_box(file_name, sha256_value, status):
box_width = 30
banner = f'''
{c}
┏┳ ┏┓ ┓• ┏┓• ┓
┃┏┓┓┏┏┓┣ ┏┫┓╋ ┣ ┓┏┓┏┫┏┓┏┓
┗┛┗┻┗┛┗┻┗┛┗┻┗┗ ┻ ┗┛┗┗┻┗ ┛ {c}~ {w}by Taikah {c}~{w}
Directory: {file_name: <{box_width-12}}
SHA256: {sha256_value: <{box_width-9}}
Status: {status: <{box_width-7}}
'''
print(banner)
sha256v = "https://pastebin.com/raw/pyur6emE"
dec256v = requests.get(sha256v)
while True:
clear()
print_box(' ', ' ', ' ')
file_name = input(f"[{y}?{w}] Enter the jar(version) with its path: ")
sha256_hash = hashlib.sha256()
with open(file_name, "rb") as f:
for byte_block in iter(lambda: f.read(4096), b""):
sha256_hash.update(byte_block)
sha256_value = sha256_hash.hexdigest()
get_file = sha256_value
try:
if get_file in dec256v.text:
status = f"{g}Java edit not found, legit.{w}"
else:
status = f"{r}Java edit found, unlegit.{w}"
except Exception as e:
status = "Something didn't work as it should! Try later"
print(e)
clear()
print_box(file_name, sha256_value, status)
input(f"[{c}!{w}] Press enter to continue")