Skip to content

Commit 32b72c2

Browse files
author
Stephen
committed
fixed string mangement bug
1 parent ca8e492 commit 32b72c2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

core/module.rb

+7-3
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,13 @@ def self.parse_targets(mod)
301301

302302
targets = {}
303303
target_config.each do |k, v|
304-
next unless BeEF::Core::Constants::CommandModule.const_defined? "VERIFIED_#{k.upcase}"
305-
306-
key = BeEF::Core::Constants::CommandModule.const_get "VERIFIED_#{k.upcase}"
304+
# Convert the key to a string if it's not already one
305+
k_str = k.to_s.upcase
306+
307+
# Use the adjusted string key for the rest of the process
308+
next unless BeEF::Core::Constants::CommandModule.const_defined? "VERIFIED_#{k_str}"
309+
310+
key = BeEF::Core::Constants::CommandModule.const_get "VERIFIED_#{k_str}"
307311
targets[key] = [] unless targets.key? key
308312
browser = nil
309313

0 commit comments

Comments
 (0)