From 6d18c6dd531a04c328f1190cadeba23220c2457a Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Mon, 16 Nov 2009 19:06:42 +0000 Subject: [PATCH] bugfix for NMAP failure, test case: "db_nmap -P" git-svn-id: file:///home/svn/framework3/trunk@7542 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/ui/console/command_dispatcher/db.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/msf/ui/console/command_dispatcher/db.rb b/lib/msf/ui/console/command_dispatcher/db.rb index 0574747e5e..60dbe1e4c1 100644 --- a/lib/msf/ui/console/command_dispatcher/db.rb +++ b/lib/msf/ui/console/command_dispatcher/db.rb @@ -724,11 +724,6 @@ class Db return end - if (not File.readable?(args[0])) - print_status("Could not read the XML file") - return - end - load_nmap_xml(args[0]) end @@ -780,6 +775,11 @@ class Db # Process Nmap XML data # def load_nmap_xml(filename) + if (not File.readable?(filename)) + print_status("Could not read the XML file") + return + end + l = NmapXMLStreamParser.new(framework) REXML::Document.parse_stream(File.new(filename), l) end