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

Merge pull request #232 from calebstewart/fix/231/ssl-parsing

Fixed ssl parsing in entrypoint/connect command
This commit is contained in:
Caleb Stewart 2022-01-09 12:51:00 -05:00 committed by GitHub
commit 3a48308ee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 7 deletions

View File

@ -9,6 +9,9 @@ and simply didn't have the time to go back and retroactively create one.
## [Unreleased]
### Changed
- Fixed parsing of `--ssl` argument ([#231](https://github.com/calebstewart/pwncat/issues/231)).
## [0.5.2] - 2021-12-31
Bug fixes for argument parsing and improved SSH key support thanks to
`paramiko-ng`. Moved to a prettier theme for ReadTheDocs documentation.

View File

@ -233,16 +233,20 @@ def main():
if query_args["certfile"] is not None or query_args["keyfile"] is not None:
query_args["ssl"] = True
if query_args["protocol"] not in [
if (
query_args["protocol"]
not in [
None,
"bind",
"connect",
] and query_args.get("ssl"):
]
and query_args.get("ssl")
):
console.log(
f"[red]error[/red]: --ssl is incompatible with an [yellow]{query_args['protocol']}[/yellow] protocol"
)
return
elif query_args["protocol"] is not None:
elif query_args["protocol"] is not None and query_args.get("ssl"):
query_args["protocol"] = "ssl-" + query_args["protocol"]
if (

View File

@ -202,7 +202,7 @@ class Command(CommandDefinition):
f"[red]error[/red]: --ssl is incompatible with an [yellow]{query_args['protocol']}[/yellow] protocol"
)
return
elif query_args["protocol"] is not None:
elif query_args["protocol"] is not None and query_args.get("ssl"):
query_args["protocol"] = "ssl-" + query_args["protocol"]
if (