1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-09-25 10:48:31 +02:00

Land #8322, fix for nil bug in nonexistent encoder

This commit is contained in:
h00die 2017-04-30 08:22:44 -04:00
commit 2ab7a42d8b
No known key found for this signature in database
GPG Key ID: C5A9D25D1457C971

View File

@ -411,6 +411,10 @@ module Msf
# Allow comma separated list of encoders so users can choose several # Allow comma separated list of encoders so users can choose several
encoder.split(',').each do |chosen_encoder| encoder.split(',').each do |chosen_encoder|
e = framework.encoders.create(chosen_encoder) e = framework.encoders.create(chosen_encoder)
if e.nil?
cli_print "Skipping invalid encoder #{chosen_encoder}"
next
end
e.datastore.import_options_from_hash(datastore) e.datastore.import_options_from_hash(datastore)
encoders << e if e encoders << e if e
end end