Show selected auxiliary action
This commit is contained in:
parent
056ee4f207
commit
a8b5bf4625
|
@ -108,6 +108,28 @@ class ReadableText
|
|||
tbl.to_s + "\n"
|
||||
end
|
||||
|
||||
# Dumps the auxiliary's selected action
|
||||
#
|
||||
# @param mod [Msf::Auxiliary] the auxiliary module.
|
||||
# @param indent [String] the indentation to use (only the length
|
||||
# matters)
|
||||
# @param h [String] the string to display as the table heading.
|
||||
# @return [String] the string form of the table.
|
||||
def self.dump_auxiliary_action(mod, indent = '', h = nil)
|
||||
tbl = Rex::Ui::Text::Table.new(
|
||||
'Indent' => indent.length,
|
||||
'Header' => h,
|
||||
'Columns' =>
|
||||
[
|
||||
'Name',
|
||||
'Description',
|
||||
])
|
||||
|
||||
tbl << [ mod.action.name || 'All', mod.action.description || '' ]
|
||||
|
||||
tbl.to_s + "\n"
|
||||
end
|
||||
|
||||
# Dumps the table of payloads that are compatible with the supplied
|
||||
# exploit.
|
||||
#
|
||||
|
|
|
@ -3140,10 +3140,13 @@ class Core
|
|||
end
|
||||
end
|
||||
|
||||
# Print the selected target
|
||||
# Print the selected target or action
|
||||
if (mod.exploit? and mod.target)
|
||||
mod_targ = Serializer::ReadableText.dump_exploit_target(mod, ' ')
|
||||
print("\nExploit target:\n\n#{mod_targ}\n") if (mod_targ and mod_targ.length > 0)
|
||||
elsif (mod.auxiliary? and mod.action)
|
||||
mod_action = Serializer::ReadableText.dump_auxiliary_action(mod, ' ')
|
||||
print("\nAuxiliary action:\n\n#{mod_action}\n") if (mod_action and mod_action.length > 0)
|
||||
end
|
||||
|
||||
# Uncomment this line if u want target like msf2 format
|
||||
|
|
Loading…
Reference in New Issue