mirror of
https://github.com/calebstewart/pwncat.git
synced 2024-11-27 19:04:15 +01:00
Fixed --ssl argument processing in main entrypoint
This commit is contained in:
parent
f8f9598268
commit
e735c40acb
@ -233,9 +233,9 @@ def main():
|
||||
if query_args["certfile"] is not None or query_args["keyfile"] is not None:
|
||||
query_args["ssl"] = True
|
||||
|
||||
if query_args["protocol"] is not None and args.ssl:
|
||||
if query_args["protocol"] not in [None, "bind", "connect"] and args.ssl:
|
||||
console.log(
|
||||
"[red]error[/red]: --ssl is incompatible with an explicit protocol"
|
||||
f"[red]error[/red]: --ssl is incompatible with an [yellow]{query_args['protocol']}[/yellow] protocol"
|
||||
)
|
||||
return
|
||||
|
||||
@ -296,14 +296,6 @@ def main():
|
||||
if "implant.remote" in fact.types:
|
||||
implants.append((target, users[fact.uid], fact))
|
||||
|
||||
with Progress(
|
||||
"triggering implant",
|
||||
"•",
|
||||
"{task.fields[status]}",
|
||||
transient=True,
|
||||
console=console,
|
||||
) as progress:
|
||||
task = progress.add_task("", status="...")
|
||||
for target, implant_user, implant in implants:
|
||||
# Check correct query_args["user"]
|
||||
if (
|
||||
@ -318,9 +310,7 @@ def main():
|
||||
):
|
||||
continue
|
||||
|
||||
progress.update(
|
||||
task, status=f"trying [cyan]{implant.source}[/cyan]"
|
||||
)
|
||||
manager.log(f"trigger implant: [cyan]{implant.source}[/cyan]")
|
||||
|
||||
# Attempt to trigger a new session
|
||||
try:
|
||||
|
@ -255,14 +255,6 @@ class Command(CommandDefinition):
|
||||
if "implant.remote" in fact.types:
|
||||
implants.append((target, users[fact.uid], fact))
|
||||
|
||||
with Progress(
|
||||
"triggering implant",
|
||||
"•",
|
||||
"{task.fields[status]}",
|
||||
transient=True,
|
||||
console=console,
|
||||
) as progress:
|
||||
task = progress.add_task("", status="...")
|
||||
for target, implant_user, implant in implants:
|
||||
# Check correct query_args["user"]
|
||||
if (
|
||||
@ -277,9 +269,7 @@ class Command(CommandDefinition):
|
||||
):
|
||||
continue
|
||||
|
||||
progress.update(
|
||||
task, status=f"trying [cyan]{implant.source}[/cyan]"
|
||||
)
|
||||
manager.log(f"trigger implant: [cyan]{implant.source}[/cyan]")
|
||||
|
||||
# Attempt to trigger a new session
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user