mirror of
https://github.com/calebstewart/pwncat.git
synced 2024-11-27 19:04:15 +01:00
Added traceback option for run
This commit is contained in:
parent
0d8e634cab
commit
06515ff7f4
@ -30,6 +30,9 @@ class Command(CommandDefinition):
|
|||||||
"--raw,-r": Parameter(
|
"--raw,-r": Parameter(
|
||||||
Complete.NONE, action="store_true", help="Display raw results unformatted"
|
Complete.NONE, action="store_true", help="Display raw results unformatted"
|
||||||
),
|
),
|
||||||
|
"--traceback,-t": Parameter(
|
||||||
|
Complete.NONE, action="store_true", help="Show traceback for module errors"
|
||||||
|
)
|
||||||
"module": Parameter(
|
"module": Parameter(
|
||||||
Complete.CHOICES,
|
Complete.CHOICES,
|
||||||
nargs="?",
|
nargs="?",
|
||||||
@ -65,7 +68,10 @@ class Command(CommandDefinition):
|
|||||||
result = pwncat.modules.run(args.module, **config_values)
|
result = pwncat.modules.run(args.module, **config_values)
|
||||||
pwncat.victim.config.back()
|
pwncat.victim.config.back()
|
||||||
except pwncat.modules.ModuleFailed as exc:
|
except pwncat.modules.ModuleFailed as exc:
|
||||||
console.log(f"[red]error[/red]: module failed: {exc}")
|
if args.traceback:
|
||||||
|
console.print_exception()
|
||||||
|
else:
|
||||||
|
console.log(f"[red]error[/red]: module failed: {exc}")
|
||||||
return
|
return
|
||||||
except pwncat.modules.ModuleNotFound:
|
except pwncat.modules.ModuleNotFound:
|
||||||
console.log(f"[red]error[/red]: {args.module}: not found")
|
console.log(f"[red]error[/red]: {args.module}: not found")
|
||||||
|
Loading…
Reference in New Issue
Block a user