From 20ec56d06ad218b90c15b0ec0949114986d02c34 Mon Sep 17 00:00:00 2001 From: dmohanty-r7 Date: Thu, 28 Apr 2016 13:16:10 -0500 Subject: [PATCH] Do not parse empty web_sites MS-255 --- .../db_manager/import/metasploit_framework/xml.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/msf/core/db_manager/import/metasploit_framework/xml.rb b/lib/msf/core/db_manager/import/metasploit_framework/xml.rb index ae6b5ae0f6..428cc77c0e 100644 --- a/lib/msf/core/db_manager/import/metasploit_framework/xml.rb +++ b/lib/msf/core/db_manager/import/metasploit_framework/xml.rb @@ -238,13 +238,13 @@ module Msf::DBManager::Import::MetasploitFramework::XML btag = metadata[:root_tag] doc.each do |node| - case node.name - when 'host' - parse_host(Nokogiri::XML(node.outer_xml).at("./#{node.name}"), wspace, bl, allow_yaml, btag, args, &block) - when 'web_site' - parse_web_site(Nokogiri::XML(node.outer_xml).at("./#{node.name}"), wspace, bl, allow_yaml, btag, args, &block) - when 'web_page', 'web_form', 'web_vuln' - unless node.inner_xml.empty? + unless node.inner_xml.empty? + case node.name + when 'host' + parse_host(Nokogiri::XML(node.outer_xml).at("./#{node.name}"), wspace, bl, allow_yaml, btag, args, &block) + when 'web_site' + parse_web_site(Nokogiri::XML(node.outer_xml).at("./#{node.name}"), wspace, bl, allow_yaml, btag, args, &block) + when 'web_page', 'web_form', 'web_vuln' send( "import_msf_#{node.name}_element", Nokogiri::XML(node.outer_xml).at("./#{node.name}"),