diff --git a/README.md b/README.md index e41cce2..5493a60 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,11 @@ ## ♦️ Download ♦️ -- Direct download: https://bit.ly/dank-tool-download +- Short Direct download: https://bit.ly/dank-tool-zip + +- Direct Download: https://github.com/SirDank/dank.tool/raw/main/dank.tool.zip + +- NOTE: password for the zip is: "dankware" ## ♦️ Short URL ♦️ diff --git a/__src__/dank.tool.py b/__src__/dank.tool.py index 4690441..6b66311 100644 --- a/__src__/dank.tool.py +++ b/__src__/dank.tool.py @@ -10,7 +10,7 @@ import requests from datetime import datetime from win10toast import ToastNotifier -from dankware import align, cls, clr, magenta, white, chdir, title, get_duration, multithread, err +from dankware import align, cls, clr, magenta, white, title, get_duration, multithread, err toast = ToastNotifier() toast.show_toast("SirDank:", "Thank you for using my tool <3\nShare it with your friends!", duration = 10, icon_path = f"{os.path.dirname(__file__)}\\dankware.ico", threaded = True) @@ -44,25 +44,31 @@ def get_request_responses(task_id): if task_id == 0: try: request_responses["dankware_runs"] = requests.get("https://api.countapi.xyz/get/dankware", timeout=3).json()['value'] - except: request_responses["dankware_runs"] = "unknown" + except: request_responses["dankware_runs"] = "?" elif task_id == 1: try: request_responses["danktool_runs"] = requests.get("https://api.countapi.xyz/get/dank.tool", timeout=3).json()['value'] - except: request_responses["danktool_runs"] = "unknown" + except: request_responses["danktool_runs"] = "?" + elif task_id == 2: + try: + tmp = requests.get("https://dank-site.onrender.com/chatroom-users", headers={"User-Agent": "dank.tool"}).content.decode() + if tmp.isdigit(): request_responses["chatroom_user_count"] = tmp + else: request_responses["chatroom_user_count"] = "?" + except: request_responses["chatroom_user_count"] = "?" - # get updated on time + # get last update time - elif task_id == 2: request_responses["dank.minecraft-server-builder"] = updated_on("dank.minecraft-server-builder") - elif task_id == 3: request_responses["dank.minecraft-server-scanner"] = updated_on("dank.minecraft-server-scanner") - elif task_id == 4: request_responses["SpotX-Win"] = updated_on("https://api.github.com/repos/SpotX-CLI/SpotX-Win/commits?path=Install.ps1&page=1&per_page=1",False) - elif task_id == 5: request_responses["Spicetify"] = updated_on("https://api.github.com/repos/spicetify/spicetify-cli/commits?path=.&page=1&per_page=1",False) - elif task_id == 6: request_responses["dank.auto-clicker"] = updated_on("dank.auto-clicker") + elif task_id == 3: request_responses["dank.minecraft-server-builder"] = updated_on("dank.minecraft-server-builder") + elif task_id == 4: request_responses["dank.minecraft-server-scanner"] = updated_on("dank.minecraft-server-scanner") + elif task_id == 5: request_responses["SpotX-Win"] = updated_on("https://api.github.com/repos/amd64fox/SpotX/commits?path=Install.ps1&page=1&per_page=1",False) + elif task_id == 6: request_responses["Spicetify"] = updated_on("https://api.github.com/repos/spicetify/spicetify-cli/commits?path=.&page=1&per_page=1",False) + elif task_id == 7: request_responses["dank.auto-clicker"] = updated_on("dank.auto-clicker") # main while True: - + title(f"𝚍𝚊𝚗𝚔.𝚝𝚘𝚘𝚕 [{current_version}]") # current_version defined in executor.py - exec_mode = "exe"; exec(chdir(exec_mode)) + os.chdir(os.path.dirname(__file__)) # exec_mode = "exe"; exec(chdir(exec_mode)) discord_rpc_state = "on the main menu" banner='\n _ _ _ \n | | | | _ | |\n _ | | ____ ____ | | _ | |_ ___ ___ | |\n / || |/ _ | _ \\| | / )| _)/ _ \\ / _ \\| |\n( (_| ( ( | | | | | |< ( | |_| |_| | |_| | |\n \\____|\\_||_|_| |_|_| \\_|_)___)___/ \\___/|_|\n' @@ -70,9 +76,9 @@ def get_request_responses(task_id): request_responses = {} while True: - try: multithread(get_request_responses, 100, [ _ for _ in range(7) ], progress_bar=False); break + try: multithread(get_request_responses, 100, [ _ for _ in range(8) ], progress_bar=False); break except KeyboardInterrupt: input(clr(f"\n > Failed to get request responses! Try not to use [COPY] or [PASTE]! Press [ENTER] to try again... ",2)) - except: input(clr(f"\n > Failed to get request responses! Make sure you are connected to the Internet! Press [ENTER] to try again... ",2)) + except: input(clr(f"\n > Failed to get request responses! Make sure you are connected to the internet! Press [ENTER] to try again... ",2)) while True: @@ -91,7 +97,7 @@ def get_request_responses(task_id): f'Minecraft Server Scanner {request_responses["dank.minecraft-server-scanner"]}', f'SpotX {request_responses["SpotX-Win"]} + Spicetify {request_responses["Spicetify"]} Installer', f'Auto Clicker {request_responses["dank.auto-clicker"]}', - 'Software Downloader [ UNFINISHED ]', + f'Chatroom [ {request_responses["chatroom_user_count"]} online ] [ coming soon! ]', ] # print modules with counter and get choice @@ -120,6 +126,7 @@ def get_request_responses(task_id): elif "Software Downloader" in choice: project, discord_rpc_state = "dank.downloader", "bulk downloading software" elif "SpotX" in choice: project, discord_rpc_state = "dank.spotify", "installing SpotX and Spicetify" elif "Auto Clicker" in choice: project, discord_rpc_state = "dank.auto-clicker", "running auto-clicker" + elif "Chatroom" in choice: project, discord_rpc_state = "dank.chatroom", "texting in the chatroom" # elif "Analyze suspicious file" in choice: project = "dank.virus-total" # elif "Sussy Optimiser" in choice: project = "dank.sussy-optimiser" # elif "HWID Spoofer" in choice: project = "dank.hwid-spoofer" @@ -132,11 +139,11 @@ def get_request_responses(task_id): if not development_version: # development_version defined in executor.py while True: try: code = requests.get(f"https://raw.githubusercontent.com/SirDank/dank.tool/main/__modules__/{project}.py").content.decode(); break - except: input(clr(f"\n > Failed to get src for {project}! Make sure you are connected to the Internet! Press [ENTER] to try again... ",2)) + except: input(clr(f"\n > Failed to get code for {project}! Make sure you are connected to the internet! Press [ENTER] to try again... ",2)) else: while True: try: code = open(f'__modules__/{project}.py', 'r', encoding='utf-8').read(); break - except: input(clr(f"\n > Failed to get src! Unable to read '__modules__/{project}.py'! Press [ENTER] to try again... ",2)) + except: input(clr(f"\n > Failed to get code! Unable to read '__modules__/{project}.py'! Press [ENTER] to try again... ",2)) # execute src @@ -157,6 +164,6 @@ def get_request_responses(task_id): # > updated to custom url to prevent webhook spamming requests.post("https://dank-site.onrender.com/dank-tool-errors", data={"text": f"```<--- 🚨 ---> Module: {choice}\n\n{err_message}```"}) break - except: input(clr(f"\n > Failed to post error report! Make sure you are connected to the Internet! Press [ENTER] to try again... ",2)) + except: input(clr(f"\n > Failed to post error report! Make sure you are connected to the internet! Press [ENTER] to try again... ",2)) cls(); input(clr("\n > Error Reported! If it is an OS error, Please run as admin and try again!\n\n > If it is a logic error, it will be fixed soon!\n\n > Press [ENTER] to EXIT... ")) diff --git a/__src__/executor.py b/__src__/executor.py index 5587a59..196fa58 100644 --- a/__src__/executor.py +++ b/__src__/executor.py @@ -13,13 +13,15 @@ - [ exec_mode = "script" ] is used for testing, to be run as a script | It is automatically changed to [ exec_mode = "exe" ] to be run as an executable ''' +import pyminizip +import subprocess from playsound import playsound from mcstatus import JavaServer from shutil import unpack_archive from win10toast import ToastNotifier from pynput.keyboard import Key, Listener from pynput.mouse import Button, Controller -from dankware import multithread, align, magenta, white, red, reset, github_downloads, github_file_selector, rm_line, random_ip, get_duration +from dankware import multithread, align, magenta, white, red, reset, github_downloads, github_file_selector, rm_line, random_ip, get_duration, chdir # required imports for executor.py @@ -27,36 +29,39 @@ import sys import time import requests -from hashlib import sha1 +#from hashlib import sha1 from pypresence import Presence from packaging.version import parse from concurrent.futures import ThreadPoolExecutor -from dankware import cls, clr, chdir, title, sys_open, err -session = requests.Session() +from dankware import cls, clr, title, sys_open, err + +# variables -# change directory to exe's location +session = requests.Session() +executor = ThreadPoolExecutor() -exec_mode = "exe" -current_version = "1.5" -file_name = sys.argv[0].split('\\')[-1] -title("𝚍𝚊𝚗𝚔.𝚝𝚘𝚘𝚕 [ 𝚒𝚗𝚒𝚝𝚒𝚊𝚕𝚒𝚣𝚒𝚗𝚐 ]"); exec(chdir(exec_mode)) +current_version = "2.0" +title("𝚍𝚊𝚗𝚔.𝚝𝚘𝚘𝚕 [ 𝚒𝚗𝚒𝚝𝚒𝚊𝚕𝚒𝚣𝚒𝚗𝚐 ]") # exec(chdir(exec_mode)) print(clr(f"\n > Version: {current_version}")) -# get latest version number +# get latest version number and valid checksums -def latest_dank_tool_version_and_checksum(): +def latest_dank_tool_version(): while True: try: latest_version = session.get("https://raw.githubusercontent.com/SirDank/dank.tool/main/__src__/executor_version.txt").content.decode() - checksums = session.get("https://raw.githubusercontent.com/SirDank/dank.tool/main/__src__/checksums.txt").content.decode() + #checksums = session.get("https://raw.githubusercontent.com/SirDank/dank.tool/main/__src__/checksums.txt").content.decode() if "Not Found" in latest_version: latest_version = "0" break - except: input(clr("\n > Failed to check for an update! Make sure you are connected to the Internet! Press [ENTER] to try again... ",2)) - return latest_version, checksums + except: + if "debug" in input(clr("\n > Failed to check for an update! Make sure you are connected to the internet! Press [ENTER] to try again... ",2)): + latest_version = "0"; break + return latest_version #, checksums -latest_version, checksums = latest_dank_tool_version_and_checksum() +latest_version = latest_dank_tool_version() +''' # check if executable checksum exists in valid list def check_file_integrity(): @@ -66,42 +71,44 @@ def check_file_integrity(): if file_name.endswith('.exe'): checksum = sha1(open(file_name,'rb').read()).hexdigest() if not checksum in checksums: - current_version = "0" warning_banner = '\n\n\n\n888 888 d8888 8888888b. 888b 888 8888888 888b 888 .d8888b. 888 \n888 o 888 d88888 888 Y88b 8888b 888 888 8888b 888 d88P Y88b 888 \n888 d8b 888 d88P888 888 888 88888b 888 888 88888b 888 888 888 888 \n888 d888b 888 d88P 888 888 d88P 888Y88b 888 888 888Y88b 888 888 888 \n888d88888b888 d88P 888 8888888P" 888 Y88b888 888 888 Y88b888 888 88888 888 \n88888P Y88888 d88P 888 888 T88b 888 Y88888 888 888 Y88888 888 888 Y8P \n8888P Y8888 d8888888888 888 T88b 888 Y8888 888 888 Y8888 Y88b d88P " \n888P Y888 d88P 888 888 T88b 888 Y888 8888888 888 Y888 "Y8888P88 888 \n\n\n' cls(); print(clr(align(warning_banner) + "\n > Integrity check failure! This may indicate that the software has been tampered with.\n\n > As a precaution, I recommend that you check your system for malware.", 2)) - input(clr("\n > Press [ ENTER ] to force update dank.tool... ")); cls() + if 'dev' not in input(clr("\n > Press [ ENTER ] to force update dank.tool... ")): current_version = "0" + cls() check_file_integrity() +''' -# version checker / updater: overwrites the existing executable with the latest one using the help of a batch script called 'dankware-updater.cmd' which deletes itself upon completion! +# version checker / updater -def download_latest_dank_tool(): +def dank_tool_installer(): - print(clr("\n > Downloading dank.tool-latest.exe...")) while True: - try: data = session.get("https://github.com/SirDank/dank.tool/blob/main/dank.tool.exe?raw=true", allow_redirects=True).content; break - except: input(clr("\n > Failed to download! Make sure you are connected to the Internet! Press [ENTER] to try again... ",2)) - open("dank.tool-latest.exe","wb").write(data); data = None # removed "start dank.tool.exe" - open("dankware-updater.cmd","w").write(f"@echo off\ntitle dankware-updater\ncolor 0a\ntimeout 3\ndel /F {file_name}\nren dank.tool-latest.exe dank.tool.exe\ncls\necho.\necho =======================\necho.\necho UPDATE COMPLETE\necho.\necho =======================\necho.\necho Run dank.tool.exe\necho.\necho =======================\necho.\necho T E R M I N A T I N G\necho.\ntimeout 3\ndel \"%~f0\" >nul 2>&1\nexit") - print(clr("\n > Downloaded!\n\n > Starting in 3s...")) - time.sleep(3); sys_open("dankware-updater.cmd"); sys.exit() + try: code = session.get("https://raw.githubusercontent.com/SirDank/dank.tool/main/__src__/updater.py").content.decode(); break + except: input(clr("\n > Failed to get code! Make sure you are connected to the internet! Press [ENTER] to try again... ",2)) + try: exec(code) + except: + err_message = err(sys.exc_info()) + print(clr(err_message, 2)) + input(clr("\n > Press [ENTER] to EXIT... ",2)) + sys.exit(1) development_version = False if parse(latest_version) > parse(current_version): - print(clr(f"\n > Update Found: {latest_version}")); download_latest_dank_tool() + print(clr(f"\n > Update Found: {latest_version}")); dank_tool_installer() elif latest_version == current_version: print(clr(f"\n > Latest Version!")) else: print(clr("\n > Development Version!")); development_version = True -# get main src from github if not dev_ver else locally +# get main code from github if development_version = False else locally if not development_version: while True: try: code = session.get("https://raw.githubusercontent.com/SirDank/dank.tool/main/__src__/dank.tool.py").content.decode(); break - except: input(clr("\n > Failed to get src! Make sure you are connected to the Internet! Press [ENTER] to try again... ",2)) + except: input(clr("\n > Failed to get code! Make sure you are connected to the internet! Press [ENTER] to try again... ",2)) else: while True: try: code = open('__src__/dank.tool.py', 'r', encoding='utf-8').read(); break - except: input(clr("\n > Failed to get src! Unable to read '__src__/dank.tool.py'! Press [ENTER] to try again... ",2)) + except: input(clr("\n > Failed to get code! Unable to read '__src__/dank.tool.py'! Press [ENTER] to try again... ",2)) # start discord rpc @@ -124,15 +131,26 @@ def dank_tool_discord_rpc(): try: RPC = Presence("1028269752386326538") RPC.connect(); discord_rpc_state = "on the main menu" - ThreadPoolExecutor(10).submit(dank_tool_discord_rpc) + executor.submit(dank_tool_discord_rpc) except: pass # update counter -def dankware_counter(): +def dank_tool_runs_counter(): try: requests.get("https://api.countapi.xyz/hit/dank.tool", timeout=3) except: pass -ThreadPoolExecutor(10).submit(dankware_counter) +executor.submit(dank_tool_runs_counter) + +# chatroom user validator + +def dank_tool_chatroom(): + session = requests.Session() + url = "https://dank-site.onrender.com/chatroom-users" + while True: + try: session.post(url) + except: pass + time.sleep(240) +executor.submit(dank_tool_chatroom) # execute, catch errors if any @@ -140,10 +158,10 @@ def dankware_counter(): try: exec(code) except: - - cls(); latest_version, checksums = latest_dank_tool_version_and_checksum() + + cls(); latest_version = latest_dank_tool_version() if not latest_version == current_version: - print(clr(f"\n > An error occured! Updating to the latest version...\n\n > Update Found: {latest_version}")); download_latest_dank_tool() + print(clr(f"\n > An error occured! Updating to the latest version...\n\n > Update Found: {latest_version}")); dank_tool_installer() else: err_message = err(sys.exc_info()) print(clr(err_message, 2)) @@ -155,5 +173,6 @@ def dankware_counter(): # > updated to custom url to prevent webhook spamming requests.post("https://dank-site.onrender.com/dank-tool-errors", data={"text": f"```<--- 🚨 ---> Version: {current_version}\n\n{err_message}```"}) break - except: input(clr(f"\n > Failed to post error report! Make sure you are connected to the Internet! Press [ENTER] to try again... ",2)) - cls(); input(clr("\n > Error Reported! If it is an OS error, Please run as admin and try again!\n\n > If it is a logic error, it will be fixed soon!\n\n > Press [ENTER] to EXIT... ",2)) \ No newline at end of file + except: input(clr(f"\n > Failed to post error report! Make sure you are connected to the internet! Press [ENTER] to try again... ",2)) + cls(); input(clr("\n > Error Reported! If it is an OS error, Please run as admin and try again!\n\n > If it is a logic error, it will be fixed soon!\n\n > Press [ENTER] to EXIT... ",2)) + diff --git a/__src__/updater.py b/__src__/updater.py new file mode 100644 index 0000000..22e3f08 --- /dev/null +++ b/__src__/updater.py @@ -0,0 +1,27 @@ +import os +import sys +import requests +import pyminizip +from dankware import cls, clr, sys_open + +try: os.chdir(os.path.join(os.environ['USERPROFILE'],'Downloads')) +except: os.chdir("C:\\") + +print(clr("\n > Downloading dank.tool.zip...")) +while True: + try: data = requests.get("https://github.com/SirDank/dank.tool/raw/main/dank.tool.zip", allow_redirects=True).content; break + except: input(clr("\n > Failed to download! Make sure you are connected to the internet! Press [ENTER] to try again... ",2)) +try: open("dank.tool.zip","wb").write(data); data = None +except: + cls(); input(clr("\n > Failed to save file!\n > Please manually download the latest version from https://github.com/SirDank/dank.tool/raw/main/dank.tool.zip\n > Press [ENTER] to EXIT... ",2)) + sys.exit() + +#open("dankware-updater.cmd","w").write(f"@echo off\ntitle dankware-updater\ncolor 0a\ntimeout 3\ndel /F {file_name}\nren dank.tool-latest.exe dank.tool.exe\ncls\necho.\necho =======================\necho.\necho UPDATE COMPLETE\necho.\necho =======================\necho.\necho Run dank.tool.exe\necho.\necho =======================\necho.\necho T E R M I N A T I N G\necho.\ntimeout 3\ndel \"%~f0\" >nul 2>&1\nexit") + +print(clr("\n > Extracting...")) +try: pyminizip.uncompress("dank.tool.zip", "dankware", None, True) +except: + cls(); input(clr(f"\n > Failed to extract!\n > Please manually extract '{os.path.join(os.getcwd(), 'dank.tool.zip')}'\n > Press [ENTER] to EXIT... ",2)) + sys.exit() +sys_open("dank.tool-[installer].exe") +sys.exit() \ No newline at end of file diff --git a/dank.tool.exe.REMOVED.git-id b/dank.tool.exe.REMOVED.git-id index 7674b13..35f50d9 100644 --- a/dank.tool.exe.REMOVED.git-id +++ b/dank.tool.exe.REMOVED.git-id @@ -1 +1 @@ -5f8212a980fa8704911411e3bd2b2c2013773fd9 \ No newline at end of file +be06419f0f0094e8e1d8dd90046b9c2770aa18ec \ No newline at end of file diff --git a/dank.tool.zip.REMOVED.git-id b/dank.tool.zip.REMOVED.git-id new file mode 100644 index 0000000..de0fb0c --- /dev/null +++ b/dank.tool.zip.REMOVED.git-id @@ -0,0 +1 @@ +70b8dcc0e5713768a3b018ae2b8a2cc709c0a224 \ No newline at end of file