diff --git a/framework/config/config.py b/framework/config/config.py index 6ebce22be..cf1de05bd 100644 --- a/framework/config/config.py +++ b/framework/config/config.py @@ -150,8 +150,8 @@ def load_work(self, target_url, options): """ target = self.target.GetTargetConfigs({'target_url': target_url}) + group = options['PluginGroup'] if options['OnlyPlugins'] is None: - group = options['PluginGroup'] # If the plugin group option is the default one (not specified by # the user). if group is None: @@ -168,6 +168,9 @@ def load_work(self, target_url, options): "code": options.get("OnlyPlugins"), "type": options.get("PluginType")} plugins = self.db_plugin.GetAll(filter_data) + if not plugins: + logging.error("No plugin found matching type %s and group '%s' for %s target" + % (options['PluginType'], group, target[0]['top_url'])) self.worklist_manager.add_work( target, plugins, diff --git a/owtf.py b/owtf.py index ba1fecabe..57608d2bb 100755 --- a/owtf.py +++ b/owtf.py @@ -55,6 +55,7 @@ def process_options(user_args): # Default settings: profiles = {} plugin_group = arg.PluginGroup + if arg.CustomProfile: # Custom profiles specified # Quick pseudo-validation check for profile in arg.CustomProfile.split(','): @@ -141,18 +142,12 @@ def process_options(user_args): except ValueError: usage("Invalid port for Inbound Proxy") - plugin_types_for_group = ServiceLocator.get_component("db_plugin").GetTypesForGroup(plugin_group) + plugin_types_for_group = db_plugin.GetTypesForGroup(plugin_group) if arg.PluginType == 'all': arg.PluginType = plugin_types_for_group elif arg.PluginType == 'quiet': arg.PluginType = ['passive', 'semi_passive'] - if plugin_group != 'web': - usage("The quiet plugin type is only for the web plugin group") - elif arg.PluginType not in plugin_types_for_group: - usage( - "Invalid Plugin Type '" + str(arg.PluginType) + - "' for Plugin Group '" + str(plugin_group) + - "'. Valid Types: " + ', '.join(plugin_types_for_group)) + scope = arg.Targets or [] # Arguments at the end are the URL target(s) num_targets = len(scope)