Skip to content

Commit 2977e8e

Browse files
committed
Add msfcli (M)issing
1 parent 4258743 commit 2977e8e

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

lib/msf/ui/console/command_dispatcher/core.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3150,7 +3150,7 @@ def show_options(mod) # :nodoc:
31503150
#print("\nTarget: #{mod.target.name}\n\n")
31513151
end
31523152

3153-
def show_options(mod) # :nodoc:
3153+
def show_missing(mod) # :nodoc:
31543154
mod_opt = Serializer::ReadableText.dump_options(mod, ' ', true)
31553155
print("\nModule options (#{mod.fullname}):\n\n#{mod_opt}\n") if (mod_opt and mod_opt.length > 0)
31563156

msfcli

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class Msfcli
4444
tbl << ['(H)elp', "You're looking at it baby!"]
4545
tbl << ['(S)ummary', 'Show information about this module']
4646
tbl << ['(O)ptions', 'Show available options for this module']
47+
tbl << ['(M)issing', 'Show empty required options for this module']
4748
tbl << ['(A)dvanced', 'Show available advanced options for this module']
4849
tbl << ['(I)DS Evasion', 'Show available ids evasion options for this module']
4950
tbl << ['(P)ayloads', 'Show available payloads for this module']
@@ -385,6 +386,15 @@ class Msfcli
385386
end
386387

387388

389+
def show_missing(m)
390+
readable = Msf::Serializer::ReadableText
391+
$stdout.puts("\n" + readable.dump_options(m[:module], @indent, true))
392+
$stdout.puts("\nPayload:\n\n" + readable.dump_options(m[:payload], @indent, true)) if m[:payload]
393+
$stdout.puts("\nEncoder:\n\n" + readable.dump_options(m[:encoder], @indent, true)) if m[:encoder]
394+
$stdout.puts("\nNOP\n\n" + readable.dump_options(m[:nop], @indent, true)) if m[:nop]
395+
end
396+
397+
388398
def show_advanced(m)
389399
readable = Msf::Serializer::ReadableText
390400
$stdout.puts("\n" + readable.dump_advanced_options(m[:module], @indent))
@@ -483,6 +493,8 @@ class Msfcli
483493
show_summary(modules)
484494
when "o"
485495
show_options(modules)
496+
when "m"
497+
show_missing(modules)
486498
when "a"
487499
show_advanced(modules)
488500
when "i"

0 commit comments

Comments
 (0)