Fix: badchars.present? is false for whitespace

badchars.present? is false in the case of badchars containing only whitespace.

Instead check for is not empty and is not nil.
bug/bundler_fix
Justin Steven 2016-04-05 09:59:52 +10:00
parent 403696d53a
commit 3bcac49c21
1 changed files with 1 additions and 1 deletions

View File

@ -376,7 +376,7 @@ module Msf
encoders << e if e
end
encoders.sort_by { |my_encoder| my_encoder.rank }.reverse
elsif badchars.present?
elsif !badchars.empty? && !badchars.nil?
framework.encoders.each_module_ranked('Arch' => [arch], 'Platform' => platform_list) do |name, mod|
e = framework.encoders.create(name)
e.datastore.import_options_from_hash(datastore)