mirror of
https://github.com/calebstewart/pwncat.git
synced 2024-11-24 01:25:37 +01:00
Merge pull request #232 from calebstewart/fix/231/ssl-parsing
Fixed ssl parsing in entrypoint/connect command
This commit is contained in:
commit
3a48308ee4
@ -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.
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user