Land #8322, fix for nil bug in nonexistent encoder

bug/bundler_fix
h00die 2017-04-30 08:22:44 -04:00
commit 2ab7a42d8b
No known key found for this signature in database
GPG Key ID: C5A9D25D1457C971
1 changed files with 4 additions and 0 deletions

View File

@ -411,6 +411,10 @@ module Msf
# Allow comma separated list of encoders so users can choose several
encoder.split(',').each do |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)
encoders << e if e
end