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:
commit
2ab7a42d8b
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user