mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-10-29 18:07:27 +01:00
Add msfcli (M)issing
This commit is contained in:
parent
425874315c
commit
2977e8e102
@ -3150,7 +3150,7 @@ class Core
|
||||
#print("\nTarget: #{mod.target.name}\n\n")
|
||||
end
|
||||
|
||||
def show_options(mod) # :nodoc:
|
||||
def show_missing(mod) # :nodoc:
|
||||
mod_opt = Serializer::ReadableText.dump_options(mod, ' ', true)
|
||||
print("\nModule options (#{mod.fullname}):\n\n#{mod_opt}\n") if (mod_opt and mod_opt.length > 0)
|
||||
|
||||
|
12
msfcli
12
msfcli
@ -44,6 +44,7 @@ class Msfcli
|
||||
tbl << ['(H)elp', "You're looking at it baby!"]
|
||||
tbl << ['(S)ummary', 'Show information about this module']
|
||||
tbl << ['(O)ptions', 'Show available options for this module']
|
||||
tbl << ['(M)issing', 'Show empty required options for this module']
|
||||
tbl << ['(A)dvanced', 'Show available advanced options for this module']
|
||||
tbl << ['(I)DS Evasion', 'Show available ids evasion options for this module']
|
||||
tbl << ['(P)ayloads', 'Show available payloads for this module']
|
||||
@ -385,6 +386,15 @@ class Msfcli
|
||||
end
|
||||
|
||||
|
||||
def show_missing(m)
|
||||
readable = Msf::Serializer::ReadableText
|
||||
$stdout.puts("\n" + readable.dump_options(m[:module], @indent, true))
|
||||
$stdout.puts("\nPayload:\n\n" + readable.dump_options(m[:payload], @indent, true)) if m[:payload]
|
||||
$stdout.puts("\nEncoder:\n\n" + readable.dump_options(m[:encoder], @indent, true)) if m[:encoder]
|
||||
$stdout.puts("\nNOP\n\n" + readable.dump_options(m[:nop], @indent, true)) if m[:nop]
|
||||
end
|
||||
|
||||
|
||||
def show_advanced(m)
|
||||
readable = Msf::Serializer::ReadableText
|
||||
$stdout.puts("\n" + readable.dump_advanced_options(m[:module], @indent))
|
||||
@ -483,6 +493,8 @@ class Msfcli
|
||||
show_summary(modules)
|
||||
when "o"
|
||||
show_options(modules)
|
||||
when "m"
|
||||
show_missing(modules)
|
||||
when "a"
|
||||
show_advanced(modules)
|
||||
when "i"
|
||||
|
Loading…
Reference in New Issue
Block a user