From 67883aa0784cc0b9c9ee7ee95ff7cb6d4bbd20c9 Mon Sep 17 00:00:00 2001 From: xemulat <98595166+xemulat@users.noreply.github.com> Date: Fri, 22 Sep 2023 18:49:45 +0200 Subject: [PATCH] FUCKKK --- main.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/main.py b/main.py index ff66d5d..3d7b02c 100644 --- a/main.py +++ b/main.py @@ -6,7 +6,6 @@ from sys import exit, argv, executable from psutil import cpu_count, virtual_memory from platform import release -from contextlib import closing from os.path import isfile from urllib.parse import urlparse from os import remove @@ -15,13 +14,11 @@ from time import sleep from getpass import getpass -from requests.adapters import HTTPAdapter from requests import Session from requests import get from lastversion import latest from colorama import Fore, init from ping3 import ping -from tqdm import tqdm from rich.progress import Progress @@ -576,16 +573,19 @@ def p3(): if isfile('bypass.xtb') == False: Printer.zpr('Checking File hash...') - response = get('https://raw.githubusercontent.com/xemulat/XToolbox/main/hash.json') - data = response.json() - if (data[version]).lower() == get_checksum(executable): - Printer.sys(1, 'File hash match!') - else: - Printer.sys(0, "File hash doesn't match!") - print("File hash doesn't match the official hash for XTBox, this means the file could be tampered with. Download the program using the displayed url.") - webopen('https://github.com/xemulat/XToolbox/releases/latest') - print('Continue anyways?') - if not yn(): exit() + try: + response = get('https://raw.githubusercontent.com/xemulat/XToolbox/main/hash.json') + data = response.json() + if (data[version]).lower() == get_checksum(executable): + Printer.sys(1, 'File hash match!') + else: + Printer.sys(0, "File hash doesn't match!") + print("File hash doesn't match the official hash for XTBox, this means the file could be tampered with. Download the program using the displayed url.") + webopen('https://github.com/xemulat/XToolbox/releases/latest') + print('Continue anyways?') + if not yn(): exit() + except: + Printer.sys(0, 'Server Error.') Printer.zpr('Checking Ping...') if ping('google.com', unit='ms') > 200: