Skip to content

Commit 1256a5b

Browse files
committed
Land rapid7#6749 - fix whitespace-only badchar handling
2 parents 403696d + 3bcac49 commit 1256a5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/msf/core/payload_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def get_encoders
376376
encoders << e if e
377377
end
378378
encoders.sort_by { |my_encoder| my_encoder.rank }.reverse
379-
elsif badchars.present?
379+
elsif !badchars.empty? && !badchars.nil?
380380
framework.encoders.each_module_ranked('Arch' => [arch], 'Platform' => platform_list) do |name, mod|
381381
e = framework.encoders.create(name)
382382
e.datastore.import_options_from_hash(datastore)

0 commit comments

Comments
 (0)