From 32b72c213493aaad6ddab232fe7e3708e5bccbf2 Mon Sep 17 00:00:00 2001 From: Stephen Date: Sun, 17 Mar 2024 17:03:30 +1000 Subject: [PATCH] fixed string mangement bug --- core/module.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/module.rb b/core/module.rb index 53c63d854..ac7982cc7 100644 --- a/core/module.rb +++ b/core/module.rb @@ -301,9 +301,13 @@ module BeEF targets = {} target_config.each do |k, v| - next unless BeEF::Core::Constants::CommandModule.const_defined? "VERIFIED_#{k.upcase}" - - key = BeEF::Core::Constants::CommandModule.const_get "VERIFIED_#{k.upcase}" + # Convert the key to a string if it's not already one + k_str = k.to_s.upcase + + # Use the adjusted string key for the rest of the process + next unless BeEF::Core::Constants::CommandModule.const_defined? "VERIFIED_#{k_str}" + + key = BeEF::Core::Constants::CommandModule.const_get "VERIFIED_#{k_str}" targets[key] = [] unless targets.key? key browser = nil