diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..92503a7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,93 @@ +Elastic License 2.0 + +URL: https://www.elastic.co/licensing/elastic-license + +## Acceptance + +By using the software, you agree to all of the terms and conditions below. + +## Copyright License + +The licensor grants you a non-exclusive, royalty-free, worldwide, +non-sublicensable, non-transferable license to use, copy, distribute, make +available, and prepare derivative works of the software, in each case subject to +the limitations and conditions below. + +## Limitations + +You may not provide the software to third parties as a hosted or managed +service, where the service provides users with access to any substantial set of +the features or functionality of the software. + +You may not move, change, disable, or circumvent the license key functionality +in the software, and you may not remove or obscure any functionality in the +software that is protected by the license key. + +You may not alter, remove, or obscure any licensing, copyright, or other notices +of the licensor in the software. Any use of the licensor’s trademarks is subject +to applicable law. + +## Patents + +The licensor grants you a license, under any patent claims the licensor can +license, or becomes able to license, to make, have made, use, sell, offer for +sale, import and have imported the software, in each case subject to the +limitations and conditions in this license. This license does not cover any +patent claims that you cause to be infringed by modifications or additions to +the software. If you or your company make any written claim that the software +infringes or contributes to infringement of any patent, your patent license for +the software granted under these terms ends immediately. If your company makes +such a claim, your patent license ends immediately for work on behalf of your +company. + +## Notices + +You must ensure that anyone who gets a copy of any part of the software from you +also gets a copy of these terms. + +If you modify the software, you must include in any modified copies of the +software prominent notices stating that you have modified the software. + +## No Other Rights + +These terms do not imply any licenses other than those expressly granted in +these terms. + +## Termination + +If you use the software in violation of these terms, such use is not licensed, +and your licenses will automatically terminate. If the licensor provides you +with a notice of your violation, and you cease all violation of this license no +later than 30 days after you receive that notice, your licenses will be +reinstated retroactively. However, if you violate these terms after such +reinstatement, any additional violation of these terms will cause your licenses +to terminate automatically and permanently. + +## No Liability + +*As far as the law allows, the software comes as is, without any warranty or +condition, and the licensor will not be liable to you for any damages arising +out of these terms or the use or nature of the software, under any kind of +legal claim.* + +## Definitions + +The **licensor** is the entity offering these terms, and the **software** is the +software the licensor makes available under these terms, including any portion +of it. + +**you** refers to the individual or entity agreeing to these terms. + +**your company** is any legal entity, sole proprietorship, or other kind of +organization that you work for, plus all organizations that have control over, +are under the control of, or are under common control with that +organization. **control** means ownership of substantially all the assets of an +entity, or the power to direct its management and policies by vote, contract, or +otherwise. Control can be direct or indirect. + +**your licenses** are all the licenses granted to you for the software under +these terms. + +**use** means anything you do with the software requiring one of your licenses. + +**trademark** means trademarks, service marks, and similar rights. \ No newline at end of file diff --git a/Login.ui b/Login.ui index 0882633..43d9778 100644 --- a/Login.ui +++ b/Login.ui @@ -197,7 +197,7 @@ QPushButton:pressed { 30 10 381 - 251 + 150 @@ -216,7 +216,7 @@ background-position: center; 85 - 288 + 220 280 50 @@ -227,6 +227,9 @@ background-position: center; 10 + + <html><head/><body><p>Username goes here.</p></body></html> + QLineEdit { border: 2px solid rgb(45, 45, 45); @@ -251,10 +254,13 @@ QLineEdit:focus { + + true + 85 - 340 + 280 280 50 @@ -265,6 +271,9 @@ QLineEdit:focus { 10 + + <html><head/><body><p>Password goes here.</p></body></html> + QLineEdit { border: 2px solid rgb(45, 45, 45); @@ -287,6 +296,9 @@ QLineEdit:focus { QLineEdit::Password + + false + PASSWORD @@ -295,9 +307,9 @@ QLineEdit:focus { 85 - 395 - 281 - 22 + 400 + 161 + 21 @@ -306,6 +318,9 @@ QLineEdit:focus { 10 + + <html><head/><body><p>Use this option if u want to save the username and password for auto-login.</p></body></html> + QCheckBox::indicator { border: 3px solid rgb(100, 100, 100); @@ -327,11 +342,14 @@ QCheckBox::indicator:checked { 85 - 425 + 460 280 50 + + <html><head/><body><p>Load the program.</p></body></html> + QPushButton { background-color: rgb(50, 50, 50); @@ -352,6 +370,88 @@ QPushButton:pressed { Load Rev-9 + + + + 85 + 430 + 181 + 21 + + + + + Segoe UI + 10 + + + + <html><head/><body><p>Use this option if u don't have an account.</p></body></html> + + + QCheckBox::indicator { + border: 3px solid rgb(100, 100, 100); + width: 15px; + height: 15px; + border-radius: 10px; + background-color: rgb(135, 135, 135); +} +QCheckBox::indicator:checked { + border: 3px solid rgb(255, 205, 0); + background-color: rgb(255, 255, 0); +} + + + REGISTER USER + + + + + + 85 + 340 + 280 + 50 + + + + + Segoe UI + 10 + + + + <html><head/><body><p>Username goes here.</p></body></html> + + + QLineEdit { + border: 2px solid rgb(45, 45, 45); + border-radius: 5px; + padding: 15px; + background-color: rgb(30, 30, 30); + color: rgb(100, 100, 100); +} +QLineEdit:hover { + border: 2px solid rgb(55, 55, 55); +} +QLineEdit:focus { + border: 2px solid rgb(255, 207, 0); + color: rgb(200, 200, 200); +} + + + LICENSE + + + 32 + + + true + + + LICENSE + + @@ -382,6 +482,9 @@ QPushButton:pressed { Segoe UI + + <html><head/><body><p>SKYNET</p></body></html> + color: rgb(75, 75, 75); diff --git a/README.md b/README.md index 5ee02ae..c05eef1 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,43 @@ # python-loader-example **Description:** -Python [KeyAuth](https://keyauth.win/) loader with basic protections and auth system. +Python [KeyAuth](https://keyauth.cc/) loader with basic protections and auth system. **WEBSITE:** -https://keyauth.win/ +https://keyauth.cc/ # Features: -**Anti-VM, pc logging, user info display, register option, save user option, auto login, basic protections (anti debugger, anti sandboxie dll injection), auth file exist check, tooltips, non sizable window, empty field check and auth file check, error display** +**Anti-VM, pc logging, user info display, register option, save user option, auto login, basic protections (anti debugger, anti sandboxie dll injection), auth file exist check, tooltips, non sizable window, empty field check and auth file check, error display, hide/unhide console option, threaded user ban and session checking every 60 seconds** # How to use: -Edit line 155(add a discord webhook) and 735(edit the keyauth api) +Check everything from line 40 to line 82, add a discord webhook at line 78 and dont forget to set up the keyauth API line 729. +# Copyright License + +KeyAuth is licensed under **Elastic License 2.0** + +* You may not provide the software to third parties as a hosted or managed +service, where the service provides users with access to any substantial set of +the features or functionality of the software. + +* You may not move, change, disable, or circumvent the license key functionality +in the software, and you may not remove or obscure any functionality in the +software that is protected by the license key. + +* You may not alter, remove, or obscure any licensing, copyright, or other notices +of the licensor in the software. Any use of the licensor’s trademarks is subject +to applicable law. + +Thank you for your compliance, we work hard on the development of KeyAuth and do not appreciate our copyright being infringed. # How to edit and re compile the UI: -Install PyQt5 and PyQt5 Designer and edit the .ui file, then convert it to python source code. Don't forget to convert the resource file! +Install PyQt5 and PyQt5 Designer and edit the .ui file, then convert it to python source code. Don't forget to convert the resource file! (Watch some PyQt5 Tutorials) + -Preview: ![image](https://user-images.githubusercontent.com/74118308/166079334-d9ffced7-7341-4cac-a88f-d73271510bd4.png) -![image](https://user-images.githubusercontent.com/74118308/166100385-7b3ea7fa-3a2d-49a9-bf57-ae27f721c376.png) +# Preview: +![image](https://user-images.githubusercontent.com/74118308/166079334-d9ffced7-7341-4cac-a88f-d73271510bd4.png) +![image](https://user-images.githubusercontent.com/74118308/211208212-21191a72-04d3-41a8-a24d-94a54ca3d233.png) **UPDATE:** -added register option, some error/file checks and tooltips + fixed some errors etc +Added live session checking, better protector, re worked some parts of the code, updated to the latest keyauth example, fixed the errors diff --git a/example_resource_file.rc b/files_rc.qrc similarity index 100% rename from example_resource_file.rc rename to files_rc.qrc diff --git a/main.py b/main.py index a39bff3..6816edd 100644 --- a/main.py +++ b/main.py @@ -6,374 +6,135 @@ # # WARNING! All changes made in this file will be lost! -#UPDATE RELEASED +# UPDATE: Added live session checking, better protector, re worked the code a little, updated to the latest keyauth example +# New update soon. (embeds[maybe], error logging through discord/more logging options, toggleable auto-login) ###############################################MODULES############################################### -import json as jsond # json -import time # sleep before exit import binascii # hex encoding -import requests # https requests -from uuid import uuid4 # gen random guid -import win32gui, win32con -from Crypto.Cipher import AES -from Crypto.Hash import SHA256 -from Crypto.Util.Padding import pad, unpad +import hashlib +import json as jsond # json +import os # aes + padding, sha256 +import os.path import platform -import subprocess -import datetime +import threading from datetime import datetime +import Files.files_rc_rc +import requests +import subprocess +import time +from uuid import uuid4 # gen random guid import sys -import os -import os.path -from requests_toolbelt.adapters.fingerprint import FingerprintAdapter import colorama +import win32con +import win32gui from colorama import Fore -from colorama import Style -import Files.files_rc_rc -import sys, os, re, ctypes, subprocess, requests -import uuid -import platform, wmi, psutil -from datetime import datetime -from urllib.request import Request, urlopen -import dhooks -from dhooks import Webhook -import time -import asyncio -import threading +from pathlib import Path +from threading import Thread +from pyprotector import PythonProtector + ###############################################MODULES############################################### os.system("cls") ###############################################SETTINGS############################################### -vmcheck_switch = True -vtdetect_switch = True -listcheck_switch = False -anti_debug_switch = False windowname = "SkyNet Loader - Login" +hide_console_switch = False # HIDE CONSOLE SWITCH / Disabled by default, console will auto show after the user logged in(set it to false if u want to see the errors) +live_ban_checking = False # Disabled by default / checks if the user is banned and auto closes app. +live_session_checking = False # Disabled by default / checks if the session is valid and not killed. +windowhide = win32gui.GetForegroundWindow() width = 500 height = 700 -#If everything is on the program will be fully protected! ###############################################SETTINGS############################################### -def block_debugger(): - while True: - time.sleep(0.7) - #print("Checking for debuggers...") - for proc in psutil.process_iter(): - try: - processName = proc.name() - if processName == "HTTPDebuggerUI.exe": - print("Blacklisted program found! HTTPDebuggerUI.exe") - time.sleep(0) - os._exit(1) - if processName == "HTTPDebuggerSvc.exe": - print("Blacklisted program found! HTTPDebuggerSvc.exe") - time.sleep(0) - os._exit(1) - if processName == "Taskmgr.exe": - print("Blacklisted program found! Task Manager") - time.sleep(0) - os._exit(1) - if processName == "ProcessHacker.exe": - print("Blacklisted program found! ProcessHacker") - time.sleep(0) - os._exit(1) - if processName == "Wireshark.exe": - print("Blacklisted program found! Wireshark") - time.sleep(0) - os._exit(1) - if processName == "OLLYDBG.EXE": - print("Blacklisted program found! OLLYDBG") - time.sleep(0) - os._exit(1) - if processName == "x64dbg.exe": - print("Blacklisted program found! x64dbg") - time.sleep(0) - os._exit(1) - if processName == "x32dbg.exe": - print("Blacklisted program found! x32dbg") - time.sleep(0) - os._exit(1) - if processName == "x96dbg.exe": - print("Blacklisted program found! x96dbg") - time.sleep(0) - os._exit(1) - if processName == "ida64.exe": - print("Blacklisted program found! ida64") - time.sleep(0) - os._exit(1) - if processName == "KsDumperClient.exe": - print("Blacklisted program found! KsDumperClient") - time.sleep(0) - os._exit(1) - if processName == "KsDumper.exe": - print("Blacklisted program found! KsDumper") - time.sleep(0) - os._exit(1) - if processName == "pestudio.exe ": - print("Blacklisted program found! pestudio") - time.sleep(0) - os._exit(1) - except: - pass - -def block_dlls(): - while True: - time.sleep(0.7) - #print("Checking for Sbie DLL Injection...") - try: - sandboxie = ctypes.cdll.LoadLibrary("SbieDll.dll") - print("Sandboxie DLL Detected") - requests.post(f'{api}',json={'content': f"**Sandboxie DLL Detected**"}) - os._exit(1) - except: - pass - -def getip(): - ip = "None" - try: - ip = urlopen(Request("https://api.ipify.org")).read().decode().strip() - except: - pass - return ip - -ip = getip() - -serveruser = os.getenv("UserName") -pc_name = os.getenv("COMPUTERNAME") -mac = ':'.join(re.findall('..', '%012x' % uuid.getnode())) -computer = wmi.WMI() -os_info = computer.Win32_OperatingSystem()[0] -os_name = os_info.Name.encode('utf-8').split(b'|')[0] -currentplat = os_name -hwid = subprocess.check_output('wmic csproduct get uuid').decode().split('\n')[1].strip() -hwidlist = requests.get('https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/hwid_list.txt') -pcnamelist = requests.get('https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/pc_name_list.txt') -pcusernamelist = requests.get('https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/pc_username_list.txt') -iplist = requests.get('https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/ip_list.txt') -maclist = requests.get('https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/mac_list.txt') -gpulist = requests.get('https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/gpu_list.txt') -platformlist = requests.get('https://raw.githubusercontent.com/6nz/virustotal-vm-blacklist/main/pc_platforms.txt') -api = "DISCORD WEBHOOK GOES HERE" - -def vtdetect(): - webhooksend = Webhook(api) - webhooksend.send(f"""```yaml -![PC DETECTED]! -PC Name: {pc_name} -PC Username: {serveruser} -HWID: {hwid} -IP: {ip} -MAC: {mac} -PLATFORM: {os_name} -CPU: {computer.Win32_Processor()[0].Name} -RAM: {str(round(psutil.virtual_memory().total / (1024.0 **3)))} GB -GPU: {computer.Win32_VideoController()[0].Name} -TIME: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}```""") - - -def vmcheck(): - def get_base_prefix_compat(): # define all of the checks - return getattr(sys, "base_prefix", None) or getattr(sys, "real_prefix", None) or sys.prefix - - def in_virtualenv(): - return get_base_prefix_compat() != sys.prefix - - if in_virtualenv() == True: # if we are in a vm - requests.post(f'{api}',json={'content': f"**VM DETECTED EXITING PROGRAM...**"}) - os._exit(1) # exit - - else: - pass - - def registry_check(): #VM REGISTRY CHECK SYSTEM [BETA] - reg1 = os.system("REG QUERY HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}\\0000\\DriverDesc 2> nul") - reg2 = os.system("REG QUERY HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}\\0000\\ProviderName 2> nul") - - if reg1 != 1 and reg2 != 1: - print("VMware Registry Detected") - requests.post(f'{api}',json={'content': f"**VMware Registry Detected**"}) - os._exit(1) - - def processes_and_files_check(): - vmware_dll = os.path.join(os.environ["SystemRoot"], "System32\\vmGuestLib.dll") - virtualbox_dll = os.path.join(os.environ["SystemRoot"], "vboxmrxnp.dll") - - process = os.popen('TASKLIST /FI "STATUS eq RUNNING" | find /V "Image Name" | find /V "="').read() - processList = [] - for processNames in process.split(" "): - if ".exe" in processNames: - processList.append(processNames.replace("K\n", "").replace("\n", "")) - if "VMwareService.exe" in processList or "VMwareTray.exe" in processList: - print("VMwareService.exe & VMwareTray.exe process are running") - requests.post(f'{api}',json={'content': f"**VMwareService.exe & VMwareTray.exe process are running**"}) - os._exit(1) - - if os.path.exists(vmware_dll): - print("Vmware DLL Detected") - requests.post(f'{api}',json={'content': f"**Vmware DLL Detected**"}) - os._exit(1) - - if os.path.exists(virtualbox_dll): - print("VirtualBox DLL Detected") - requests.post(f'{api}',json={'content': f"**VirtualBox DLL Detected**"}) - os._exit(1) - - try: - sandboxie = ctypes.cdll.LoadLibrary("SbieDll.dll") - print("Sandboxie DLL Detected") - requests.post(f'{api}',json={'content': f"**Sandboxie DLL Detected**"}) - os._exit(1) - except: - pass - - def mac_check(): - mac_address = ':'.join(re.findall('..', '%012x' % uuid.getnode())) - vmware_mac_list = ["00:05:69", "00:0c:29", "00:1c:14", "00:50:56"] - if mac_address[:8] in vmware_mac_list: - print("VMware MAC Address Detected") - requests.post(f'{api}',json={'content': f"**VMware MAC Address Detected**"}) - os._exit(1) - print("[*] Checking VM") - registry_check() - processes_and_files_check() - mac_check() - print("[+] VM Not Detected : )") - webhooksend = Webhook(api) - webhooksend.send("[+] VM Not Detected : )") - - -def listcheck(): - try: - if hwid in hwidlist.text: - print('BLACKLISTED HWID DETECTED') - print(f'HWID: {hwid}') - requests.post(f'{api}',json={'content': f"**Blacklisted HWID Detected. HWID:** `{hwid}`"}) - time.sleep(2) - os._exit(1) - else: - pass - except: - print('[ERROR]: Failed to connect to database.') - time.sleep(2) - os._exit(1) - - try: - if serveruser in pcusernamelist.text: - print('BLACKLISTED PC USER DETECTED!') - print(f'PC USER: {serveruser}') - requests.post(f'{api}',json={'content': f"**Blacklisted PC User:** `{serveruser}`"}) - time.sleep(2) - os._exit(1) - else: - pass - except: - print('[ERROR]: Failed to connect to database.') - time.sleep(2) - os._exit(1) - - try: - if pc_name in pcnamelist.text: - print('BLACKLISTED PC NAME DETECTED!') - print(f'PC NAME: {pc_name}') - requests.post(f'{api}',json={'content': f"**Blacklisted PC Name:** `{pc_name}`"}) - time.sleep(2) - os._exit(1) - else: - pass - except: - print('[ERROR]: Failed to connect to database.') - time.sleep(2) - os._exit(1) - - try: - if ip in iplist.text: - print('BLACKLISTED IP DETECTED!') - print(f'IP: {ip}') - requests.post(f'{api}',json={'content': f"**Blacklisted IP:** `{ip}`"}) - time.sleep(2) - os._exit(1) - else: - pass - except: - print('[ERROR]: Failed to connect to database.') - time.sleep(2) - os._exit(1) - - try: - if mac in maclist.text: - print('BLACKLISTED MAC DETECTED!') - print(f'MAC: {mac}') - requests.post(f'{api}',json={'content': f"**Blacklisted MAC:** `{mac}`"}) - time.sleep(2) - os._exit(1) - else: - pass - except: - print('[ERROR]: Failed to connect to database.') - time.sleep(2) - os._exit(1) - - gpu = computer.Win32_VideoController()[0].Name - - try: - if gpu in gpulist.text: - print('BLACKLISTED GPU DETECTED!') - print(f'GPU: {gpu}') - requests.post(f'{api}',json={'content': f"**Blacklisted GPU:** `{gpu}`"}) - time.sleep(2) - os._exit(1) - else: - pass - except: - print('[ERROR]: Failed to connect to database.') - time.sleep(2) - os._exit(1) - - -if anti_debug_switch == True: - try: - b = threading.Thread(name='Anti-Debug', target=block_debugger) - b.start() - b2 = threading.Thread(name='Anti-DLL', target=block_dlls) - b2.start() - except: - pass -else: - pass - -if vtdetect_switch == True: - vtdetect() -else: - pass -if vmcheck_switch == True: - vmcheck() -else: - pass -if listcheck_switch == True: - listcheck() +###############################################SECURITY############################################### + +""" + ____ ____ __ __ + / __ \\ __ __ / __ \\ _____ ____ / /_ ___ _____ / /_ + / /_/ // / / // /_/ // ___// __ \\ / __// _ \\ / ___// __/ + / ____// /_/ // ____// / / /_/ // /_ / __// /__ / /_ +/_/ \\__, //_/ /_/ \\____/ \\__/ \\___/ \\___/ \\__/ + /____/ + +Made With ❤️ By Ghoul & Marci +""" +# -- Define Constants +LOGGING_PATH = ( + Path.home() / "AppData/Roaming/PythonProtector/logs/[Security].log" +) # -- This can be any path + +# -- Construct Class +security = PythonProtector( + debug=True, + modules=[ + "AntiProcess", + "AntiVM", + "Miscellaneous", + "AntiDLL", + "AntiAnalysis"], + logs_path=LOGGING_PATH, + webhook_url="webhook here", + on_detect=[ + "Report", + "Exit", + "Screenshot"], +) +###############################################SECURITY############################################### +if hide_console_switch: + win32gui.ShowWindow(windowhide, win32con.SW_HIDE) else: pass -def slow_type(text, speed, newLine = True): +def slow_type(text, speed, newLine=True): for i in text: - print(i, end = "", flush = True) + print(i, end="", flush=True) time.sleep(speed) - if newLine: - print() + if newLine: + print() + -def all(): +def all(): # example console program that will be loaded after register print("Hello, this is my test program!") + time.sleep(10) + os._exit(1) + + +try: + if os.name == 'nt': + import win32security # get sid (WIN only) + import requests # https requests + from Crypto.Cipher import AES + from Crypto.Hash import SHA256 + from Crypto.Util.Padding import pad, unpad +except ModuleNotFoundError: + print("Exception when importing modules") + print("Installing necessary modules....") + if os.path.isfile("requirements.txt"): + os.system("pip install -r requirements.txt") + else: + os.system("pip install pywin32") + os.system("pip install pycryptodome") + os.system("pip install requests") + print("Modules installed!") + time.sleep(1.5) + os._exit(1) + +try: # Connection check + s = requests.Session() # Session + s.get('https://google.com') +except requests.exceptions.RequestException as e: + print(e) time.sleep(3) os._exit(1) + class api: - name = ownerid = secret = version = "" + name = ownerid = secret = version = hash_to_check = "" - def __init__(self, name, ownerid, secret, version): + def __init__(self, name, ownerid, secret, version, hash_to_check): self.name = name self.ownerid = ownerid @@ -381,18 +142,79 @@ def __init__(self, name, ownerid, secret, version): self.secret = secret self.version = version + self.hash_to_check = hash_to_check + self.init() sessionid = enckey = "" + initialized = False + + def checkblacklist(self): + self.checkinit() + hwid = others.get_hwid() + init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() + post_data = { + "type": binascii.hexlify("checkblacklist".encode()), + "hwid": encryption.encrypt(hwid, self.enckey, init_iv), + "sessionid": binascii.hexlify(self.sessionid.encode()), + "name": binascii.hexlify(self.name.encode()), + "ownerid": binascii.hexlify(self.ownerid.encode()), + "init_iv": init_iv + } + response = self.__do_request(post_data) + + response = encryption.decrypt(response, self.enckey, init_iv) + json = jsond.loads(response) + if json["success"]: + return True + else: + return False + + def banchecker(self): + while True: + try: + time.sleep(60) + status = api.checkblacklist(self) + # print(status) + if "True" in str(status): + print("User banned.") + time.sleep(1) + os._exit(0) + else: + # Do something + pass + except Exception as e: + print(e) + pass + + def checkinit(self): + if not self.initialized: + print("Initialize first, in order to use the functions") + time.sleep(2) + os._exit(1) + + def initchecker(self): + while True: + try: + time.sleep(120) + self.checkinit() + except Exception as e: + print(e) + pass def init(self): + if self.sessionid != "": + print("You've already initialized!") + time.sleep(2) + os._exit(1) init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() self.enckey = SHA256.new(str(uuid4())[:8].encode()).hexdigest() post_data = { - "type": binascii.hexlify(("init").encode()), + "type": binascii.hexlify("init".encode()), "ver": encryption.encrypt(self.version, self.secret, init_iv), + "hash": self.hash_to_check, "enckey": encryption.encrypt(self.enckey, self.secret, init_iv), "name": binascii.hexlify(self.name.encode()), "ownerid": binascii.hexlify(self.ownerid.encode()), @@ -403,25 +225,38 @@ def init(self): if response == "KeyAuth_Invalid": print("The application doesn't exist") - sys.exit() + os._exit(1) response = encryption.decrypt(response, self.secret, init_iv) json = jsond.loads(response) + if json["message"] == "invalidver": + if json["download"] != "": + print("New Version Available") + download_link = json["download"] + os.system(f"start {download_link}") + os._exit(1) + else: + print("Invalid Version, Contact owner to add download link to latest app version") + os._exit(1) + if not json["success"]: print(json["message"]) - sys.exit() + os._exit(1) self.sessionid = json["sessionid"] + self.initialized = True + self.__load_app_data(json["appinfo"]) def register(self, user, password, license, hwid=None): + self.checkinit() if hwid is None: hwid = others.get_hwid() init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() post_data = { - "type": binascii.hexlify(("register").encode()), + "type": binascii.hexlify("register".encode()), "username": encryption.encrypt(user, self.enckey, init_iv), "pass": encryption.encrypt(password, self.enckey, init_iv), "key": encryption.encrypt(license, self.enckey, init_iv), @@ -433,55 +268,28 @@ def register(self, user, password, license, hwid=None): } response = self.__do_request(post_data) - response = encryption.decrypt(response, self.enckey, init_iv) - json = jsond.loads(response) if json["success"]: - time.sleep(1) - #print("Successfully registered! Restarting program...") + self.__load_user_data(json["info"]) + # print("Successfully registered! Restarting program...") time.sleep(0) - #python = sys.executable - #os.execl(python, python, *sys.argv) - else: - print(json["message"]) - sys.exit() - - def upgrade(self, user, license): - - init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() - - post_data = { - "type": binascii.hexlify(("upgrade").encode()), - "username": encryption.encrypt(user, self.enckey, init_iv), - "key": encryption.encrypt(license, self.enckey, init_iv), - "sessionid": binascii.hexlify(self.sessionid.encode()), - "name": binascii.hexlify(self.name.encode()), - "ownerid": binascii.hexlify(self.ownerid.encode()), - "init_iv": init_iv - } - - response = self.__do_request(post_data) - - response = encryption.decrypt(response, self.enckey, init_iv) - - json = jsond.loads(response) - - if json["success"]: - print("Successfully upgraded user!") + # python = sys.executable + # os.execl(python, python, *sys.argv) else: print(json["message"]) - sys.exit() + os._exit(1) def login(self, user, password, hwid=None): + self.checkinit() if hwid is None: hwid = others.get_hwid() init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() post_data = { - "type": binascii.hexlify(("login").encode()), + "type": binascii.hexlify("login".encode()), "username": encryption.encrypt(user, self.enckey, init_iv), "pass": encryption.encrypt(password, self.enckey, init_iv), "hwid": encryption.encrypt(hwid, self.enckey, init_iv), @@ -499,40 +307,61 @@ def login(self, user, password, hwid=None): if json["success"]: self.__load_user_data(json["info"]) - time.sleep(1) + hider = win32gui.FindWindowEx(None, None, None, str(windowname)) + win32gui.ShowWindow(hider, win32con.SW_HIDE) os.system("cls") slow_type(f"{Fore.RED}Successfully logged in! Starting program...{Fore.RESET}", 0.03) + if live_ban_checking: + try: + # print("Starting ban checking system...") + b = threading.Thread(name='Ban Checker', target=api.banchecker, args=(self,)) + b.start() + # print("Started.") + except: + pass + else: + pass + if live_session_checking: + try: + # print("Starting session checking system...") + b1 = threading.Thread(name='Session Checker', target=api.checkinit, args=(self,)) + b1.start() + # print("Started.") + except: + pass + else: + pass time.sleep(1) os.system("cls") n = int(self.user_data.expires) n2 = int(self.user_data.createdate) n3 = int(self.user_data.lastlogin) - slow_type(f"{Fore.RED}Welcome back {Fore.GREEN}{keyauthapp.user_data.username}!", 0.02) + slow_type(f"{Fore.RED}Welcome back {Fore.GREEN}{keyauthapp.user_data.username}!", 0.02) # USER INFO DISPLAY slow_type(f"\n{Fore.RED}IP address: {Fore.GREEN}{keyauthapp.user_data.ip}", 0.02) slow_type(f"{Fore.RED}Hardware-Id: {Fore.GREEN}{keyauthapp.user_data.hwid}", 0.02) - slow_type(f"{Fore.RED}Created at: {Fore.GREEN}{datetime.utcfromtimestamp(n2).strftime('%Y-%m-%d %H:%M:%S')}", 0.02) - slow_type(f"{Fore.RED}Expires at: {Fore.GREEN}{datetime.utcfromtimestamp(n).strftime('%Y-%m-%d %H:%M:%S')}", 0.02) - slow_type(f"{Fore.RED}Last login at: {Fore.GREEN}{datetime.utcfromtimestamp(n3).strftime('%Y-%m-%d %H:%M:%S')}{Fore.RESET}", 0.02) + slow_type( + f"{Fore.RED}Created at: {Fore.GREEN}{datetime.utcfromtimestamp(n2).strftime('%Y-%m-%d %H:%M:%S')}", + 0.02) + slow_type(f"{Fore.RED}Expires at: {Fore.GREEN}{datetime.utcfromtimestamp(n).strftime('%Y-%m-%d %H:%M:%S')}", + 0.02) + slow_type( + f"{Fore.RED}Last login at: {Fore.GREEN}{datetime.utcfromtimestamp(n3).strftime('%Y-%m-%d %H:%M:%S')}{Fore.RESET}", + 0.02) time.sleep(2) - hider = win32gui.FindWindowEx(None, None, None, str(windowname)) - win32gui.ShowWindow(hider, win32con.SW_HIDE) os.system('cls') all() else: print(json["message"]) time.sleep(2) - sys.exit() - - def license(self, key, hwid=None): - if hwid is None: - hwid = others.get_hwid() + os._exit(1) + def var(self, name): + self.checkinit() init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() post_data = { - "type": binascii.hexlify(("license").encode()), - "key": encryption.encrypt(key, self.enckey, init_iv), - "hwid": encryption.encrypt(hwid, self.enckey, init_iv), + "type": binascii.hexlify("var".encode()), + "varid": encryption.encrypt(name, self.enckey, init_iv), "sessionid": binascii.hexlify(self.sessionid.encode()), "name": binascii.hexlify(self.name.encode()), "ownerid": binascii.hexlify(self.ownerid.encode()), @@ -540,52 +369,91 @@ def license(self, key, hwid=None): } response = self.__do_request(post_data) + response = encryption.decrypt(response, self.enckey, init_iv) json = jsond.loads(response) if json["success"]: - self.__load_user_data(json["info"]) - time.sleep(1) - print("Successfully logged into license! Starting program...") - time.sleep(1) - all() + return json["message"] else: print(json["message"]) - sys.exit() - - def var(self, name): + time.sleep(5) + os._exit(1) + def getvar(self, var_name): + self.checkinit() init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() post_data = { - "type": binascii.hexlify(("var").encode()), - "varid": encryption.encrypt(name, self.enckey, init_iv), + "type": binascii.hexlify("getvar".encode()), + "var": encryption.encrypt(var_name, self.enckey, init_iv), "sessionid": binascii.hexlify(self.sessionid.encode()), "name": binascii.hexlify(self.name.encode()), "ownerid": binascii.hexlify(self.ownerid.encode()), "init_iv": init_iv } - response = self.__do_request(post_data) + response = encryption.decrypt(response, self.enckey, init_iv) + json = jsond.loads(response) + if json["success"]: + return json["response"] + else: + print(json["message"]) + time.sleep(5) + os._exit(1) + + def setvar(self, var_name, var_data): + self.checkinit() + init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() + post_data = { + "type": binascii.hexlify("setvar".encode()), + "var": encryption.encrypt(var_name, self.enckey, init_iv), + "data": encryption.encrypt(var_data, self.enckey, init_iv), + "sessionid": binascii.hexlify(self.sessionid.encode()), + "name": binascii.hexlify(self.name.encode()), + "ownerid": binascii.hexlify(self.ownerid.encode()), + "init_iv": init_iv + } + response = self.__do_request(post_data) response = encryption.decrypt(response, self.enckey, init_iv) + json = jsond.loads(response) + if json["success"]: + return True + else: + print(json["message"]) + time.sleep(5) + os._exit(1) + + def ban(self): + self.checkinit() + init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() + post_data = { + "type": binascii.hexlify("ban".encode()), + "sessionid": binascii.hexlify(self.sessionid.encode()), + "name": binascii.hexlify(self.name.encode()), + "ownerid": binascii.hexlify(self.ownerid.encode()), + "init_iv": init_iv + } + response = self.__do_request(post_data) + response = encryption.decrypt(response, self.enckey, init_iv) json = jsond.loads(response) if json["success"]: - return json["message"] + return True else: print(json["message"]) time.sleep(5) - sys.exit() + os._exit(1) def file(self, fileid): - + self.checkinit() init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() post_data = { - "type": binascii.hexlify(("file").encode()), + "type": binascii.hexlify("file".encode()), "fileid": encryption.encrypt(fileid, self.enckey, init_iv), "sessionid": binascii.hexlify(self.sessionid.encode()), "name": binascii.hexlify(self.name.encode()), @@ -602,17 +470,19 @@ def file(self, fileid): if not json["success"]: print(json["message"]) time.sleep(5) - sys.exit() + os._exit(1) return binascii.unhexlify(json["contents"]) - def webhook(self, webid, param): - + def webhook(self, webid, param, body="", conttype=""): + self.checkinit() init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() post_data = { - "type": binascii.hexlify(("webhook").encode()), + "type": binascii.hexlify("webhook".encode()), "webid": encryption.encrypt(webid, self.enckey, init_iv), "params": encryption.encrypt(param, self.enckey, init_iv), + "body": encryption.encrypt(body, self.enckey, init_iv), + "conttype": encryption.encrypt(conttype, self.enckey, init_iv), "sessionid": binascii.hexlify(self.sessionid.encode()), "name": binascii.hexlify(self.name.encode()), "ownerid": binascii.hexlify(self.ownerid.encode()), @@ -629,14 +499,33 @@ def webhook(self, webid, param): else: print(json["message"]) time.sleep(5) - sys.exit() + os._exit(1) - def log(self, message): + def check(self): + self.checkinit() + init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() + post_data = { + "type": binascii.hexlify("check".encode()), + "sessionid": binascii.hexlify(self.sessionid.encode()), + "name": binascii.hexlify(self.name.encode()), + "ownerid": binascii.hexlify(self.ownerid.encode()), + "init_iv": init_iv + } + response = self.__do_request(post_data) + response = encryption.decrypt(response, self.enckey, init_iv) + json = jsond.loads(response) + if json["success"]: + return True + else: + return False + + def log(self, message): + self.checkinit() init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() post_data = { - "type": binascii.hexlify(("log").encode()), + "type": binascii.hexlify("log".encode()), "pcuser": encryption.encrypt(os.getenv('username'), self.enckey, init_iv), "message": encryption.encrypt(message, self.enckey, init_iv), "sessionid": binascii.hexlify(self.sessionid.encode()), @@ -647,19 +536,104 @@ def log(self, message): self.__do_request(post_data) - def __do_request(self, post_data): + def fetchOnline(self): + self.checkinit() + init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() + + post_data = { + "type": binascii.hexlify("fetchOnline".encode()), + "sessionid": binascii.hexlify(self.sessionid.encode()), + "name": binascii.hexlify(self.name.encode()), + "ownerid": binascii.hexlify(self.ownerid.encode()), + "init_iv": init_iv + } + + response = self.__do_request(post_data) + response = encryption.decrypt(response, self.enckey, init_iv) + + json = jsond.loads(response) + + if json["success"]: + if len(json["users"]) == 0: + return None # THIS IS ISSUE ON KEYAUTH SERVER SIDE 6.8.2022, so it will return none if it is not an array. + else: + return json["users"] + else: + return None + + def chatGet(self, channel): + self.checkinit() + init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() + + post_data = { + "type": binascii.hexlify("chatget".encode()), + "channel": encryption.encrypt(channel, self.enckey, init_iv), + "sessionid": binascii.hexlify(self.sessionid.encode()), + "name": binascii.hexlify(self.name.encode()), + "ownerid": binascii.hexlify(self.ownerid.encode()), + "init_iv": init_iv + } + + response = self.__do_request(post_data) + response = encryption.decrypt(response, self.enckey, init_iv) + + json = jsond.loads(response) + + if json["success"]: + return json["messages"] + else: + return None + + def chatSend(self, message, channel): + self.checkinit() + init_iv = SHA256.new(str(uuid4())[:8].encode()).hexdigest() - rq_out = requests.post( - "https://keyauth.win/api/1.0/", data=post_data - ) + post_data = { + "type": binascii.hexlify("chatsend".encode()), + "message": encryption.encrypt(message, self.enckey, init_iv), + "channel": encryption.encrypt(channel, self.enckey, init_iv), + "sessionid": binascii.hexlify(self.sessionid.encode()), + "name": binascii.hexlify(self.name.encode()), + "ownerid": binascii.hexlify(self.ownerid.encode()), + "init_iv": init_iv + } + + response = self.__do_request(post_data) + response = encryption.decrypt(response, self.enckey, init_iv) + + json = jsond.loads(response) + + if json["success"]: + return True + else: + return False + + def __do_request(self, post_data): + try: + rq_out = s.post( + "https://keyauth.win/api/1.0/", data=post_data, timeout=30 + ) + return rq_out.text + except requests.exceptions.Timeout: + print("Request timed out") - return rq_out.text + class application_data_class: + numUsers = numKeys = app_ver = customer_panel = onlineUsers = "" # region user_data + class user_data_class: - username = ip = hwid = expires = createdate = lastlogin = "" + username = ip = hwid = expires = createdate = lastlogin = subscription = subscriptions = "" user_data = user_data_class() + app_data = application_data_class() + + def __load_app_data(self, data): + self.app_data.numUsers = data["numUsers"] + self.app_data.numKeys = data["numKeys"] + self.app_data.app_ver = data["version"] + self.app_data.customer_panel = data["customerPanelLink"] + self.app_data.onlineUsers = data["numOnlineUsers"] def __load_user_data(self, data): self.user_data.username = data["username"] @@ -668,22 +642,29 @@ def __load_user_data(self, data): self.user_data.expires = data["subscriptions"][0]["expiry"] self.user_data.createdate = data["createdate"] self.user_data.lastlogin = data["lastlogin"] + self.user_data.subscription = data["subscriptions"][0]["subscription"] + self.user_data.subscriptions = data["subscriptions"] class others: @staticmethod def get_hwid(): - if platform.system() != "Windows": - return "None" - - cmd = subprocess.Popen( - "wmic useraccount where name='%username%' get sid", stdout=subprocess.PIPE, shell=True) - - (suppost_sid, error) = cmd.communicate() - - suppost_sid = suppost_sid.split(b'\n')[1].strip() - - return suppost_sid.decode() + if platform.system() == "Linux": + with open("/etc/machine-id") as f: + hwid = f.read() + return hwid + elif platform.system() == 'Windows': + winuser = os.getlogin() + sid = win32security.LookupAccountName(None, winuser)[ + 0] # You can also use WMIC (better than SID, some users had problems with WMIC) + hwid = win32security.ConvertSidToStringSid(sid) + return hwid + elif platform.system() == 'Darwin': + output = subprocess.Popen("ioreg -l | grep IOPlatformSerialNumber", stdout=subprocess.PIPE, + shell=True).communicate()[0] + serial = output.decode().split('=', 1)[1].replace(' ', '') + hwid = serial[1:-2] + return hwid class encryption: @@ -716,8 +697,9 @@ def encrypt(message, enc_key, iv): return encryption.encrypt_string(message.encode(), _key.encode(), _iv.encode()).decode() except: - print("Invalid Application Information. Long text is secret short text is ownerid. Name is supposed to be app name not username") - sys.exit() + print( + "Invalid Application Information. Long text is secret short text is ownerid. Name is supposed to be app name not username") + os._exit(1) @staticmethod def decrypt(message, enc_key, iv): @@ -728,18 +710,32 @@ def decrypt(message, enc_key, iv): return encryption.decrypt_string(message.encode(), _key.encode(), _iv.encode()).decode() except: - print("Invalid Application Information. Long text is secret short text is ownerid. Name is supposed to be app name not username") - sys.exit() + print( + "Invalid Application Information. Long text is secret short text is ownerid. Name is supposed to be app name not username") + os._exit(1) + os.system("cls") -keyauthapp = api("appname", "ownerid", "secret","1.0") -keyauthapp.init() +def getchecksum(): + md5_hash = hashlib.md5() + file = open(''.join(sys.argv), "rb") + md5_hash.update(file.read()) + digest = md5_hash.hexdigest() + return digest -colorama.init() -time.sleep(1) +keyauthapp = api( + name = "", #App name (Manage Applications --> Application name) + ownerid = "", #Owner ID (Account-Settings --> OwnerID) + secret = "", #App secret(Manage Applications --> App credentials code) + version = "1.0", + hash_to_check = getchecksum() +) + +colorama.init() +# FILE CHECK try: if os.path.isfile('Files/auth.json'): if jsond.load(open("Files/auth.json"))["authusername"] == "": @@ -750,7 +746,8 @@ def decrypt(message, enc_key, iv): authfile = jsond.load(f) authuser = authfile.get('authusername') authpass = authfile.get('authpassword') - keyauthapp.login(authuser,authpass) + win32gui.ShowWindow(windowhide, win32con.SW_SHOW) + keyauthapp.login(authuser, authpass) except Exception as e: print(e) else: @@ -760,16 +757,15 @@ def decrypt(message, enc_key, iv): "authusername": "", "authpassword": "" }""") - f.close() + f.close() except Exception as e: - print(e) + print(e) except Exception as e: print(f"Error while loading auth file... check if the auth file is missing/empty or not ERROR CODE: {e}") time.sleep(3) os._exit(1) - from PyQt5 import QtCore, QtGui, QtWidgets @@ -778,34 +774,34 @@ class Ui_MainWindow(object): # STYLES # styleLineEditOk = ("QLineEdit {\n" -" border: 2px solid rgb(45, 45, 45);\n" -" border-radius: 5px;\n" -" padding: 15px;\n" -" background-color: rgb(30, 30, 30); \n" -" color: rgb(100, 100, 100);\n" -"}\n" -"QLineEdit:hover {\n" -" border: 2px solid rgb(55, 55, 55);\n" -"}\n" -"QLineEdit:focus {\n" -" border: 2px solid rgb(255, 207, 0); \n" -" color: rgb(200, 200, 200);\n" -"}") + " border: 2px solid rgb(45, 45, 45);\n" + " border-radius: 5px;\n" + " padding: 15px;\n" + " background-color: rgb(30, 30, 30); \n" + " color: rgb(100, 100, 100);\n" + "}\n" + "QLineEdit:hover {\n" + " border: 2px solid rgb(55, 55, 55);\n" + "}\n" + "QLineEdit:focus {\n" + " border: 2px solid rgb(255, 207, 0); \n" + " color: rgb(200, 200, 200);\n" + "}") styleLineEditError = ("QLineEdit {\n" -" border: 2px solid rgb(255, 85, 127);\n" -" border-radius: 5px;\n" -" padding: 15px;\n" -" background-color: rgb(30, 30, 30); \n" -" color: rgb(100, 100, 100);\n" -"}\n" -"QLineEdit:hover {\n" -" border: 2px solid rgb(55, 55, 55);\n" -"}\n" -"QLineEdit:focus {\n" -" border: 2px solid rgb(255, 207, 0); \n" -" color: rgb(200, 200, 200);\n" -"}") + " border: 2px solid rgb(255, 85, 127);\n" + " border-radius: 5px;\n" + " padding: 15px;\n" + " background-color: rgb(30, 30, 30); \n" + " color: rgb(100, 100, 100);\n" + "}\n" + "QLineEdit:hover {\n" + " border: 2px solid rgb(55, 55, 55);\n" + "}\n" + "QLineEdit:focus {\n" + " border: 2px solid rgb(255, 207, 0); \n" + " color: rgb(200, 200, 200);\n" + "}") stylePopupError = ("background-color: rgb(255, 85, 127); border-radius: 5px;") stylePopupOk = ("background-color: rgb(0, 255, 123); border-radius: 5px;") @@ -813,7 +809,7 @@ class Ui_MainWindow(object): # # FUNCTIONS # - + def checkFields(self): textUser = "" textPassword = "" @@ -847,8 +843,6 @@ def showMessage(message): user = self.lineEdit_user.text() password = self.lineEdit_password.text() license = self.lineEdit_license.text() - #text = " Login Successful. " - #print(f"Login {self.lineEdit_user.text()} {self.lineEdit_password.text()}") if self.checkBox_save_user.isChecked(): if self.checkBox_register_user.isChecked(): import json as jason @@ -857,11 +851,11 @@ def showMessage(message): jason.dump(config, open('Files/auth.json', 'w'), sort_keys=False, indent=4) config["authpassword"] = (self.lineEdit_password.text()) jason.dump(config, open('Files/auth.json', 'w'), sort_keys=False, indent=4) - #text = text + " | Save user: Yes " try: - keyauthapp.register(user,password,license) + win32gui.ShowWindow(windowhide, win32con.SW_SHOW) + keyauthapp.register(user, password, license) time.sleep(1) - keyauthapp.login(user,password) + keyauthapp.login(user, password) except Exception as e: print(e) else: @@ -872,20 +866,23 @@ def showMessage(message): jason.dump(config, open('Files/auth.json', 'w'), sort_keys=False, indent=4) config["authpassword"] = (self.lineEdit_password.text()) jason.dump(config, open('Files/auth.json', 'w'), sort_keys=False, indent=4) - keyauthapp.login(user,password) + win32gui.ShowWindow(windowhide, win32con.SW_SHOW) + keyauthapp.login(user, password) except Exception as e: print(e) else: if self.checkBox_register_user.isChecked(): try: - keyauthapp.register(user,password,license) + win32gui.ShowWindow(windowhide, win32con.SW_SHOW) + keyauthapp.register(user, password, license) time.sleep(1) - keyauthapp.login(user,password) + keyauthapp.login(user, password) except Exception as e: print(e) else: try: - keyauthapp.login(user,password) + win32gui.ShowWindow(windowhide, win32con.SW_SHOW) + keyauthapp.login(user, password) except Exception as e: print(e) @@ -901,7 +898,7 @@ def setupUi(self, MainWindow): icon.addPixmap(QtGui.QPixmap(":/Icon/Images/Icon.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off) MainWindow.setWindowIcon(icon) MainWindow.setStyleSheet("color: rgb(200, 200, 200);\n" -"background-color: rgb(10, 10, 10);") + "background-color: rgb(10, 10, 10);") self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) @@ -921,7 +918,7 @@ def setupUi(self, MainWindow): self.frame_error = QtWidgets.QFrame(self.top_bar) self.frame_error.setMaximumSize(QtCore.QSize(450, 16777215)) self.frame_error.setStyleSheet("background-color: rgb(255, 85, 127);\n" -"border-radius: 5px;") + "border-radius: 5px;") self.frame_error.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_error.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_error.setObjectName("frame_error") @@ -936,19 +933,19 @@ def setupUi(self, MainWindow): self.pushButton_close_pupup = QtWidgets.QPushButton(self.frame_error) self.pushButton_close_pupup.setMaximumSize(QtCore.QSize(20, 20)) self.pushButton_close_pupup.setStyleSheet("QPushButton {\n" -" border-radius: 5px; \n" -" background-image: url(:/Close_Image/Images/cil-x.png);\n" -" background-position: center; \n" -" background-color: rgb(60, 60, 60);\n" -"}\n" -"QPushButton:hover {\n" -" background-color: rgb(50, 50, 50); \n" -" color: rgb(200, 200, 200);\n" -"}\n" -"QPushButton:pressed {\n" -" background-color: rgb(35, 35, 35); \n" -" color: rgb(200, 200, 200);\n" -"}") + " border-radius: 5px; \n" + " background-image: url(:/Close_Image/Images/cil-x.png);\n" + " background-position: center; \n" + " background-color: rgb(60, 60, 60);\n" + "}\n" + "QPushButton:hover {\n" + " background-color: rgb(50, 50, 50); \n" + " color: rgb(200, 200, 200);\n" + "}\n" + "QPushButton:pressed {\n" + " background-color: rgb(35, 35, 35); \n" + " color: rgb(200, 200, 200);\n" + "}") self.pushButton_close_pupup.setText("") self.pushButton_close_pupup.setObjectName("pushButton_close_pupup") self.horizontalLayout_3.addWidget(self.pushButton_close_pupup) @@ -970,8 +967,8 @@ def setupUi(self, MainWindow): self.logo = QtWidgets.QFrame(self.login_area) self.logo.setGeometry(QtCore.QRect(30, 10, 381, 150)) self.logo.setStyleSheet("background-image: url(:/Logo/Images/logo_360x90.png);\n" -"background-repeat: no-repeat;\n" -"background-position: center;") + "background-repeat: no-repeat;\n" + "background-position: center;") self.logo.setFrameShape(QtWidgets.QFrame.StyledPanel) self.logo.setFrameShadow(QtWidgets.QFrame.Raised) self.logo.setObjectName("logo") @@ -982,19 +979,19 @@ def setupUi(self, MainWindow): font.setPointSize(10) self.lineEdit_user.setFont(font) self.lineEdit_user.setStyleSheet("QLineEdit {\n" -" border: 2px solid rgb(45, 45, 45);\n" -" border-radius: 5px;\n" -" padding: 15px;\n" -" background-color: rgb(30, 30, 30); \n" -" color: rgb(100, 100, 100);\n" -"}\n" -"QLineEdit:hover {\n" -" border: 2px solid rgb(55, 55, 55);\n" -"}\n" -"QLineEdit:focus {\n" -" border: 2px solid rgb(255, 207, 0); \n" -" color: rgb(200, 200, 200);\n" -"}") + " border: 2px solid rgb(45, 45, 45);\n" + " border-radius: 5px;\n" + " padding: 15px;\n" + " background-color: rgb(30, 30, 30); \n" + " color: rgb(100, 100, 100);\n" + "}\n" + "QLineEdit:hover {\n" + " border: 2px solid rgb(55, 55, 55);\n" + "}\n" + "QLineEdit:focus {\n" + " border: 2px solid rgb(255, 207, 0); \n" + " color: rgb(200, 200, 200);\n" + "}") self.lineEdit_user.setMaxLength(32) self.lineEdit_user.setObjectName("lineEdit_user") self.lineEdit_password = QtWidgets.QLineEdit(self.login_area) @@ -1005,19 +1002,19 @@ def setupUi(self, MainWindow): font.setPointSize(10) self.lineEdit_password.setFont(font) self.lineEdit_password.setStyleSheet("QLineEdit {\n" -" border: 2px solid rgb(45, 45, 45);\n" -" border-radius: 5px;\n" -" padding: 15px;\n" -" background-color: rgb(30, 30, 30); \n" -" color: rgb(100, 100, 100);\n" -"}\n" -"QLineEdit:hover {\n" -" border: 2px solid rgb(55, 55, 55);\n" -"}\n" -"QLineEdit:focus {\n" -" border: 2px solid rgb(255, 207, 0); \n" -" color: rgb(200, 200, 200);\n" -"}") + " border: 2px solid rgb(45, 45, 45);\n" + " border-radius: 5px;\n" + " padding: 15px;\n" + " background-color: rgb(30, 30, 30); \n" + " color: rgb(100, 100, 100);\n" + "}\n" + "QLineEdit:hover {\n" + " border: 2px solid rgb(55, 55, 55);\n" + "}\n" + "QLineEdit:focus {\n" + " border: 2px solid rgb(255, 207, 0); \n" + " color: rgb(200, 200, 200);\n" + "}") self.lineEdit_password.setMaxLength(16) self.lineEdit_password.setEchoMode(QtWidgets.QLineEdit.Password) self.lineEdit_password.setReadOnly(False) @@ -1029,33 +1026,33 @@ def setupUi(self, MainWindow): font.setPointSize(10) self.checkBox_save_user.setFont(font) self.checkBox_save_user.setStyleSheet("QCheckBox::indicator {\n" -" border: 3px solid rgb(100, 100, 100);\n" -" width: 15px;\n" -" height: 15px;\n" -" border-radius: 10px; \n" -" background-color: rgb(135, 135, 135);\n" -"}\n" -"QCheckBox::indicator:checked {\n" -" border: 3px solid rgb(255, 205, 0);\n" -" background-color: rgb(255, 255, 0);\n" -"}") + " border: 3px solid rgb(100, 100, 100);\n" + " width: 15px;\n" + " height: 15px;\n" + " border-radius: 10px; \n" + " background-color: rgb(135, 135, 135);\n" + "}\n" + "QCheckBox::indicator:checked {\n" + " border: 3px solid rgb(255, 205, 0);\n" + " background-color: rgb(255, 255, 0);\n" + "}") self.checkBox_save_user.setObjectName("checkBox_save_user") self.pushButton_login = QtWidgets.QPushButton(self.login_area) self.pushButton_login.setGeometry(QtCore.QRect(85, 460, 280, 50)) self.pushButton_login.setStyleSheet("QPushButton { \n" -" background-color: rgb(50, 50, 50);\n" -" border: 2px solid rgb(60, 60, 60);\n" -" border-radius: 5px;\n" -"}\n" -"QPushButton:hover { \n" -" background-color: rgb(60, 60, 60);\n" -" border: 2px solid rgb(70, 70, 70);\n" -"}\n" -"QPushButton:pressed { \n" -" background-color: rgb(250, 230, 0);\n" -" border: 2px solid rgb(255, 165, 24); \n" -" color: rgb(35, 35, 35);\n" -"}") + " background-color: rgb(50, 50, 50);\n" + " border: 2px solid rgb(60, 60, 60);\n" + " border-radius: 5px;\n" + "}\n" + "QPushButton:hover { \n" + " background-color: rgb(60, 60, 60);\n" + " border: 2px solid rgb(70, 70, 70);\n" + "}\n" + "QPushButton:pressed { \n" + " background-color: rgb(250, 230, 0);\n" + " border: 2px solid rgb(255, 165, 24); \n" + " color: rgb(35, 35, 35);\n" + "}") self.pushButton_login.setObjectName("pushButton_login") self.checkBox_register_user = QtWidgets.QCheckBox(self.login_area) self.checkBox_register_user.setGeometry(QtCore.QRect(85, 430, 181, 21)) @@ -1064,16 +1061,16 @@ def setupUi(self, MainWindow): font.setPointSize(10) self.checkBox_register_user.setFont(font) self.checkBox_register_user.setStyleSheet("QCheckBox::indicator {\n" -" border: 3px solid rgb(100, 100, 100);\n" -" width: 15px;\n" -" height: 15px;\n" -" border-radius: 10px; \n" -" background-color: rgb(135, 135, 135);\n" -"}\n" -"QCheckBox::indicator:checked {\n" -" border: 3px solid rgb(255, 205, 0);\n" -" background-color: rgb(255, 255, 0);\n" -"}") + " border: 3px solid rgb(100, 100, 100);\n" + " width: 15px;\n" + " height: 15px;\n" + " border-radius: 10px; \n" + " background-color: rgb(135, 135, 135);\n" + "}\n" + "QCheckBox::indicator:checked {\n" + " border: 3px solid rgb(255, 205, 0);\n" + " background-color: rgb(255, 255, 0);\n" + "}") self.checkBox_register_user.setObjectName("checkBox_register_user") self.lineEdit_license = QtWidgets.QLineEdit(self.login_area) self.lineEdit_license.setGeometry(QtCore.QRect(85, 340, 280, 50)) @@ -1082,21 +1079,21 @@ def setupUi(self, MainWindow): font.setPointSize(10) self.lineEdit_license.setFont(font) self.lineEdit_license.setStyleSheet("QLineEdit {\n" -" border: 2px solid rgb(45, 45, 45);\n" -" border-radius: 5px;\n" -" padding: 15px;\n" -" background-color: rgb(30, 30, 30); \n" -" color: rgb(100, 100, 100);\n" -"}\n" -"QLineEdit:hover {\n" -" border: 2px solid rgb(55, 55, 55);\n" -"}\n" -"QLineEdit:focus {\n" -" border: 2px solid rgb(255, 207, 0); \n" -" color: rgb(200, 200, 200);\n" -"}") + " border: 2px solid rgb(45, 45, 45);\n" + " border-radius: 5px;\n" + " padding: 15px;\n" + " background-color: rgb(30, 30, 30); \n" + " color: rgb(100, 100, 100);\n" + "}\n" + "QLineEdit:hover {\n" + " border: 2px solid rgb(55, 55, 55);\n" + "}\n" + "QLineEdit:focus {\n" + " border: 2px solid rgb(255, 207, 0); \n" + " color: rgb(200, 200, 200);\n" + "}") self.lineEdit_license.setMaxLength(32) - #self.lineEdit_license.setReadOnly(True) + # self.lineEdit_license.setReadOnly(True) self.lineEdit_license.setObjectName("lineEdit_license") self.horizontalLayout.addWidget(self.login_area) self.verticalLayout.addWidget(self.content) @@ -1113,7 +1110,7 @@ def setupUi(self, MainWindow): font.setFamily("Segoe UI") self.label_credits.setFont(font) self.label_credits.setStyleSheet("color: rgb(75, 75, 75);") - self.label_credits.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_credits.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_credits.setObjectName("label_credits") self.verticalLayout_2.addWidget(self.label_credits) self.verticalLayout.addWidget(self.bottom) @@ -1125,7 +1122,6 @@ def setupUi(self, MainWindow): # setting the fixed size of window MainWindow.setFixedSize(width, height) - # # FUNCTIONS # @@ -1139,8 +1135,6 @@ def setupUi(self, MainWindow): # BT LOGIN self.pushButton_login.clicked.connect(self.checkFields) - - self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) @@ -1148,23 +1142,33 @@ def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", windowname)) self.label_error.setText(_translate("MainWindow", "Error")) - self.lineEdit_user.setToolTip(_translate("MainWindow", "

Username goes here.

")) + self.lineEdit_user.setToolTip( + _translate("MainWindow", "

Username goes here.

")) self.lineEdit_user.setPlaceholderText(_translate("MainWindow", "USERNAME")) - self.lineEdit_password.setToolTip(_translate("MainWindow", "

Password goes here.

")) + self.lineEdit_password.setToolTip( + _translate("MainWindow", "

Password goes here.

")) self.lineEdit_password.setPlaceholderText(_translate("MainWindow", "PASSWORD")) - self.checkBox_save_user.setToolTip(_translate("MainWindow", "

Use this option if u want to save the username and password for auto-login.

")) + self.checkBox_save_user.setToolTip(_translate("MainWindow", + "

Use this option if u want to save the username and password for auto-login.

")) self.checkBox_save_user.setText(_translate("MainWindow", "Save User")) - self.pushButton_login.setToolTip(_translate("MainWindow", "

Load the program.

")) + self.pushButton_login.setToolTip( + _translate("MainWindow", "

Load the program.

")) self.pushButton_login.setText(_translate("MainWindow", "Load Program")) - self.checkBox_register_user.setToolTip(_translate("MainWindow", "

Use this option if u don\'t have an account.

")) + self.checkBox_register_user.setToolTip(_translate("MainWindow", + "

Use this option if u don\'t have an account.

")) self.checkBox_register_user.setText(_translate("MainWindow", "Register User")) self.label_credits.setToolTip(_translate("MainWindow", "

SKYNET

")) self.lineEdit_license.setPlaceholderText(_translate("MainWindow", "LICENSE")) - self.lineEdit_license.setToolTip(_translate("MainWindow", "

Only if u want to register! Key goes here...

")) + self.lineEdit_license.setToolTip(_translate("MainWindow", + "

Only if u want to register! Key goes here...

")) self.label_credits.setText(_translate("MainWindow", "Created by: SkyNet")) + if __name__ == "__main__": - import sys + SecurityThread = Thread( + name="Python Protector", target=security.start + ) # -- Start Before Any Other Code Is Run + SecurityThread.start() app = QtWidgets.QApplication(sys.argv) MainWindow = QtWidgets.QMainWindow() ui = Ui_MainWindow() diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..bb895ea --- /dev/null +++ b/requirements.txt @@ -0,0 +1,10 @@ +pywin32 +requests +pycryptodome +colorama +PyQt5 +wmi +psutil +pythonprotector +pillow +cryptography