Added error handling to msfvenom when generating payloads
Added error handling to msfvenom when generating payloadsunstable
parent
88a42aeffe
commit
9028eed573
7
msfvenom
7
msfvenom
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue