From 13b690867d4fef388fcae81177e199225f4f7150 Mon Sep 17 00:00:00 2001 From: pitust <41321673+pitust@users.noreply.github.com> Date: Mon, 14 Sep 2020 00:14:07 +0100 Subject: [PATCH] Fixed prompt.py --- pwncat/commands/prompt.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pwncat/commands/prompt.py b/pwncat/commands/prompt.py index 210d955..c404048 100644 --- a/pwncat/commands/prompt.py +++ b/pwncat/commands/prompt.py @@ -20,7 +20,7 @@ class Command(CommandDefinition): Complete.NONE, group="mutex", action="store_true", - help="Set a basic prompt with no color or automatic system information", + help="Set a basic prompt with no color or automatic system information. There _should_ be no reason to use that anymore (unless your local terminal has no ANSI support)", ), "--fancy,-f": Parameter( Complete.NONE, @@ -33,13 +33,8 @@ class Command(CommandDefinition): def run(self, args): if args.fancy: - pwncat.victim.remote_prefix = "\\[\\033[01;31m\\](remote)\\[\\033[00m\\]" - pwncat.victim.remote_prompt = ( - "\\[\\033[01;33m\\]\\u@\\h\\[\\033[00m\\]:\\[" - "\\033[01;36m\\]\\w\\[\\033[00m\\]\\$ " - ) + pwncat.victim.remote_prompt = """$(command printf "\033[01;31m(remote)\033[0m \033[01;33m$(whoami)@$(hostname)\033[0m:\033[1;36m$PWD\033[0m$ ")""" else: - pwncat.victim.remote_prefix = "(remote)" - pwncat.victim.remote_prompt = f"{pwncat.victim.host.ip}:$PWD\\$ " + pwncat.victim.remote_prompt = f"(remote) {pwncat.victim.host.ip}:$PWD\\$ " pwncat.victim.reset(hard=False)