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 (