From 88019d21a332e10c38ad03176d0bf125af4e78ce Mon Sep 17 00:00:00 2001 From: bcoles Date: Sun, 5 Jan 2014 05:45:48 +1030 Subject: [PATCH] Add error message for nil command module key --- core/main/handlers/modules/command.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/core/main/handlers/modules/command.rb b/core/main/handlers/modules/command.rb index 6e4679ca4..2f0edde8c 100644 --- a/core/main/handlers/modules/command.rb +++ b/core/main/handlers/modules/command.rb @@ -29,6 +29,7 @@ module BeEF command_module = BeEF::Modules::Commands.const_get(command_module.path.split('/').last.capitalize).new else key = BeEF::Module.get_key_by_database_id(command.command_module_id) + (print_error "Could not find command module with ID #{command.command_module_id}"; return) if key.nil? command_module = BeEF::Core::Command.const_get(config.get("beef.module.#{key}.class")).new(key) end