@@ -2070,7 +2070,7 @@ def cmd_show_help
2070
2070
global_opts = %w{ all encoders nops exploits payloads auxiliary plugins options }
2071
2071
print_status ( "Valid parameters for the \" show\" command are: #{ global_opts . join ( ", " ) } " )
2072
2072
2073
- module_opts = %w{ advanced evasion targets actions }
2073
+ module_opts = %w{ missing advanced evasion targets actions }
2074
2074
print_status ( "Additional module-specific parameters are: #{ module_opts . join ( ", " ) } " )
2075
2075
end
2076
2076
@@ -2113,6 +2113,12 @@ def cmd_show(*args)
2113
2113
else
2114
2114
show_global_options
2115
2115
end
2116
+ when 'missing'
2117
+ if ( mod )
2118
+ show_missing ( mod )
2119
+ else
2120
+ print_error ( "No module selected." )
2121
+ end
2116
2122
when 'advanced'
2117
2123
if ( mod )
2118
2124
show_advanced_options ( mod )
@@ -2167,7 +2173,7 @@ def cmd_show_tabs(str, words)
2167
2173
2168
2174
res = %w{ all encoders nops exploits payloads auxiliary post plugins options }
2169
2175
if ( active_module )
2170
- res . concat ( %w{ advanced evasion targets actions } )
2176
+ res . concat ( %w{ missing advanced evasion targets actions } )
2171
2177
if ( active_module . respond_to? :compatible_sessions )
2172
2178
res << "sessions"
2173
2179
end
@@ -3144,6 +3150,29 @@ def show_options(mod) # :nodoc:
3144
3150
#print("\nTarget: #{mod.target.name}\n\n")
3145
3151
end
3146
3152
3153
+ def show_options ( mod ) # :nodoc:
3154
+ mod_opt = Serializer ::ReadableText . dump_options ( mod , ' ' , true )
3155
+ print ( "\n Module options (#{ mod . fullname } ):\n \n #{ mod_opt } \n " ) if ( mod_opt and mod_opt . length > 0 )
3156
+
3157
+ # If it's an exploit and a payload is defined, create it and
3158
+ # display the payload's options
3159
+ if ( mod . exploit? and mod . datastore [ 'PAYLOAD' ] )
3160
+ p = framework . payloads . create ( mod . datastore [ 'PAYLOAD' ] )
3161
+
3162
+ if ( !p )
3163
+ print_error ( "Invalid payload defined: #{ mod . datastore [ 'PAYLOAD' ] } \n " )
3164
+ return
3165
+ end
3166
+
3167
+ p . share_datastore ( mod . datastore )
3168
+
3169
+ if ( p )
3170
+ p_opt = Serializer ::ReadableText . dump_options ( p , ' ' , true )
3171
+ print ( "\n Payload options (#{ mod . datastore [ 'PAYLOAD' ] } ):\n \n #{ p_opt } \n " ) if ( p_opt and p_opt . length > 0 )
3172
+ end
3173
+ end
3174
+ end
3175
+
3147
3176
def show_global_options
3148
3177
columns = [ 'Option' , 'Current Setting' , 'Description' ]
3149
3178
tbl = Table . new (
0 commit comments