From 39447c6a31ea32dd75723c60885a2f01cfa9c737 Mon Sep 17 00:00:00 2001 From: Caleb Stewart Date: Wed, 16 Jun 2021 19:10:33 -0400 Subject: [PATCH] Ran pre-merge checks and updated changelog --- CHANGELOG.md | 7 ++++++- pwncat/__main__.py | 5 ++++- pwncat/channel/socket.py | 4 ++-- pwncat/commands/connect.py | 5 ++++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a76753f..7ccd87a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,12 @@ and simply didn't have the time to go back and retroactively create one. ### Changed - Changed session tracking so session IDs aren't reused - Changed zsh prompt to match CWD of other shell prompts - +### Added +- Added `ssl-bind` and `ssl-connect` channel protocols for encrypted shells +- Added `--certificate/--cert` argument to entrypoint and `connect` command +- Added query-string arguments to connection strings for both the entrypoint + and the `connect` command. + ## [0.4.2] - 2021-06-15 Quick patch release due to corrected bug in `ChannelFile` which caused command output to be empty in some situations. diff --git a/pwncat/__main__.py b/pwncat/__main__.py index d15f023..4fef9c1 100644 --- a/pwncat/__main__.py +++ b/pwncat/__main__.py @@ -268,7 +268,10 @@ def main(): task = progress.add_task("", status="...") for target, implant_user, implant in implants: # Check correct query_args["user"] - if query_args["user"] is not None and implant_user.name != user: + if ( + query_args["user"] is not None + and implant_user.name != query_args["user"] + ): continue # Check correct platform if ( diff --git a/pwncat/channel/socket.py b/pwncat/channel/socket.py index ffa51a2..3a51475 100644 --- a/pwncat/channel/socket.py +++ b/pwncat/channel/socket.py @@ -100,7 +100,7 @@ class Socket(Channel): except BrokenPipeError as exc: self._connected = False raise ChannelClosed(self) from exc - except (ssl.SSLEOFError, ssl.SSLSyscallError, ssl.SSLZeroReturnError): + except (ssl.SSLEOFError, ssl.SSLSyscallError, ssl.SSLZeroReturnError) as exc: self._connected = False raise ChannelClosed(self) from exc @@ -133,7 +133,7 @@ class Socket(Channel): return data except ssl.SSLWantReadError: return data - except (ssl.SSLEOFError, ssl.SSLSyscallError, ssl.SSLZeroReturnError): + except (ssl.SSLEOFError, ssl.SSLSyscallError, ssl.SSLZeroReturnError) as exc: self._connected = False raise ChannelClosed(self) from exc except socket.error as exc: diff --git a/pwncat/commands/connect.py b/pwncat/commands/connect.py index 3ce0beb..9df85f4 100644 --- a/pwncat/commands/connect.py +++ b/pwncat/commands/connect.py @@ -237,7 +237,10 @@ class Command(CommandDefinition): task = progress.add_task("", status="...") for target, implant_user, implant in implants: # Check correct query_args["user"] - if query_args["user"] is not None and implant_user.name != user: + if ( + query_args["user"] is not None + and implant_user.name != query_args["user"] + ): continue # Check correct platform if (