Added error handling to msfvenom when generating payloads

Added error handling to msfvenom when generating payloads
unstable
g0tmi1k 2013-06-26 13:50:31 +01:00
parent 88a42aeffe
commit 9028eed573
1 changed files with 6 additions and 1 deletions

View File

@ -340,10 +340,15 @@ else
end
if payload_raw.nil? or payload_raw.empty?
payload_raw = payload.generate_simple(
begin
payload_raw = payload.generate_simple(
'Format' => fmt,
'Options' => datastore,
'Encoder' => nil)
rescue
$stderr.puts "Error generating payload: #{$!}"
exit
end
end
if opts[:template]