From be2da59710edf49921d71bf3141b917c428c720f Mon Sep 17 00:00:00 2001 From: Caleb Stewart Date: Thu, 7 May 2020 17:06:46 -0400 Subject: [PATCH] Added pwncat prompt colors --- pwncat/pty.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pwncat/pty.py b/pwncat/pty.py index a9daa37..cc4b15f 100644 --- a/pwncat/pty.py +++ b/pwncat/pty.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -from prompt_toolkit import prompt, PromptSession +from prompt_toolkit import prompt, PromptSession, ANSI from prompt_toolkit.shortcuts import ProgressBar import subprocess import logging @@ -62,7 +62,9 @@ class PtyHandler: self.lhost = None self.known_binaries = {} self.vars = {"lhost": None} - self.prompt = PromptSession("localhost$ ") + self.prompt = PromptSession( + [("", "(local) "), ("#ff0000", "pwncat"), ("", "$ ")] + ) self.binary_aliases = { "python": [ "python2",