Land #2098 - Catch Rex::ArgumentParseError
commit
b5d59980d2
9
msfcli
9
msfcli
|
@ -141,8 +141,12 @@ exploit.init_ui(
|
|||
mode = ARGV.pop || 'h'
|
||||
|
||||
# Import options
|
||||
exploit.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
|
||||
|
||||
begin
|
||||
exploit.datastore.import_options_from_s(ARGV.join('_|_'), '_|_')
|
||||
rescue Rex::ArgumentParseError => e
|
||||
puts "[!] Error: #{e.message}\n\n"
|
||||
exit
|
||||
end
|
||||
|
||||
# Initialize associated modules
|
||||
payload = nil
|
||||
|
@ -178,7 +182,6 @@ case mode.downcase
|
|||
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_module(payload, Indent)) if payload
|
||||
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_module(encoder, Indent)) if encoder
|
||||
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_module(nop, Indent)) if nop
|
||||
|
||||
when "o"
|
||||
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_options(exploit, Indent))
|
||||
$stdout.puts("\n" + Msf::Serializer::ReadableText.dump_options(payload, Indent)) if payload
|
||||
|
|
Loading…
Reference in New Issue