Default taget_str in send.stdout/send.stderr to target.name
This commit is contained in:
parent
fe67edecac
commit
0dbf44a681
1 changed files with 4 additions and 2 deletions
|
@ -461,8 +461,9 @@ class Module(ModuleManager.BaseModule):
|
||||||
|
|
||||||
@utils.hook("send.stdout")
|
@utils.hook("send.stdout")
|
||||||
def send_stdout(self, event):
|
def send_stdout(self, event):
|
||||||
|
target = event["target"]
|
||||||
stdout = outs.StdOut(event["server"], event["module_name"],
|
stdout = outs.StdOut(event["server"], event["module_name"],
|
||||||
event["target"], event.get("target_str", ""), {})
|
target, event.get("target_str", target.name), {})
|
||||||
|
|
||||||
if event.get("hide_prefix", False):
|
if event.get("hide_prefix", False):
|
||||||
stdout.hide_prefix()
|
stdout.hide_prefix()
|
||||||
|
@ -473,8 +474,9 @@ class Module(ModuleManager.BaseModule):
|
||||||
event["target"].last_stdout = stdout
|
event["target"].last_stdout = stdout
|
||||||
@utils.hook("send.stderr")
|
@utils.hook("send.stderr")
|
||||||
def send_stderr(self, event):
|
def send_stderr(self, event):
|
||||||
|
target = event["target"]
|
||||||
stderr = outs.StdErr(event["server"], event["module_name"],
|
stderr = outs.StdErr(event["server"], event["module_name"],
|
||||||
event["target"], event.get("target_str", ""), {})
|
target, event.get("target_str", target.name), {})
|
||||||
|
|
||||||
if event.get("hide_prefix", False):
|
if event.get("hide_prefix", False):
|
||||||
stderr.hide_prefix()
|
stderr.hide_prefix()
|
||||||
|
|
Loading…
Reference in a new issue