From 1ba4f42749477a2755d07460dfe2f96dcfa37027 Mon Sep 17 00:00:00 2001 From: Bram Beekman <37911406+brambeekman@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:49:58 +0100 Subject: [PATCH] Update hoaxshell-listener.py for the ampersand (&) character is not allowed error Update hoaxshell-listener.py for the ampersand (&) character is not allowed error. --- revshells/hoaxshell-listener.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/revshells/hoaxshell-listener.py b/revshells/hoaxshell-listener.py index fd97e1e..2e668a8 100644 --- a/revshells/hoaxshell-listener.py +++ b/revshells/hoaxshell-listener.py @@ -102,7 +102,7 @@ def exit_with_msg(msg): payload_type = args.type.lower().strip() constraint_mode = True if payload_type in ['cmd-curl', 'ps-iex-cm', 'ps-outfile-cm'] else False delimiter = str(uuid.uuid4())[0:8] - grab_prompt_dir_cmd = f"(echo {delimiter} & cd)" if payload_type in ['cmd-curl'] else "echo `r;pwd" + grab_prompt_dir_cmd = f"echo {delimiter} ; cd" if payload_type in ['cmd-curl'] else "echo `r;pwd" # Check if port is valid. if args.port: @@ -573,7 +573,7 @@ def main(): if user_input == "pwd" and payload_type not in ['cmd-curl']: user_input = "split-path $pwd'\\0x00'" - full_command = f"({user_input} & echo {delimiter} & cd)" if payload_type in ['cmd-curl'] else user_input + ";pwd" + full_command = f"{user_input} ; echo {delimiter} ; cd" if payload_type in ['cmd-curl'] else user_input + ";pwd" Hoaxshell.command_pool.append(full_command) Hoaxshell.prompt_ready = False