From 7980a7052c187c15463ea63dbab32934ec30065a Mon Sep 17 00:00:00 2001 From: sinn3r Date: Sun, 9 Nov 2014 14:27:59 -0600 Subject: [PATCH] Fix #4132 - msfvenom undefined method fullname for NilClass --- msfvenom | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/msfvenom b/msfvenom index 648e5a01aa..0531ae70a6 100755 --- a/msfvenom +++ b/msfvenom @@ -283,6 +283,12 @@ if __FILE__ == $0 if generator_opts[:list_options] payload_mod = framework.payloads.create(generator_opts[:payload]) + + if payload_mod.nil? + $stderr.puts "Invalid payload: #{generator_opts[:payload]}" + exit + end + $stderr.puts "Options for #{payload_mod.fullname}\n\n" + ::Msf::Serializer::ReadableText.dump_module(payload_mod,' ') exit(0) end