1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-27 19:04:15 +01:00

Fixes line-wrapping issues due to unescaped unprintable characters

This commit is contained in:
Caleb Stewart 2020-11-06 00:38:00 -05:00
parent 4601432c60
commit c93b429769

View File

@ -106,7 +106,7 @@ class Victim:
self.saved_term_state = None # util.enter_raw_mode()
# util.restore_terminal(self.saved_term_state, new_line=False)
# Prompt
self.remote_prompt = """$(command printf "\\033[01;31m(remote)\\033[0m \\033[01;33m$(whoami)@$(hostname)\\033[0m:\\033[1;36m$PWD\\033[0m$ ")"""
self.remote_prompt = """$(command printf "\\[\\033[01;31m\\](remote)\\[\\033[0m\\] \\[\\033[01;33m\\]$(whoami)@$(hostname)\\[\\033[0m\\]:\\[\\033[1;36m\\]$PWD\\[\\033[0m\\]$ ")"""
# Aliases for equivalent commands
self.binary_aliases = {
"python": [
@ -2035,7 +2035,10 @@ class Victim:
id_properties["groups"] = groups
else:
p = value.split("(")
id_properties[key] = {"id": int(p[0]), "name": p[1].split(")")[0]}
id_properties[key] = {
"id": int(p[0]),
"name": p[1].split(")")[0],
}
if "euid" not in id_properties:
id_properties["euid"] = id_properties["uid"]
@ -2051,7 +2054,7 @@ class Victim:
except (KeyError, ValueError):
# The output was messed up. We'll try again
pass
raise RuntimeError("The id command is returning weird results. Aborting.")
def reload_users(self):