From f0d1ceccae90b0c4b5a1b82cb23572eca9514ee2 Mon Sep 17 00:00:00 2001 From: Marven11 <110723864+Marven11@users.noreply.github.com> Date: Mon, 15 May 2023 20:02:50 +0800 Subject: [PATCH] v0.2.9: Warn user when payload will not print command execution result. --- VERSION | 2 +- fenjing/cli.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index a45be46..1866a36 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2.8 +0.2.9 diff --git a/fenjing/cli.py b/fenjing/cli.py index 4c529f3..65e2a5c 100644 --- a/fenjing/cli.py +++ b/fenjing/cli.py @@ -31,8 +31,12 @@ def cmd_exec(cmd, cracker: FormCracker, field: str, full_payload_gen: FullPayloadGen): - payload = full_payload_gen.generate(OS_POPEN_READ, cmd) + payload, will_print = full_payload_gen.generate(OS_POPEN_READ, cmd) logger.info(f"Submit payload {colored('blue', payload)}") + if not will_print: + logger.warning("Payload generator says that this payload {wont_print} command execution result.".format( + wont_print = colored('red', "won't print") + )) r = cracker.submit( {field: payload}) assert r is not None