From 87ba4a95943e2361465ddc103e65db927035e0db Mon Sep 17 00:00:00 2001 From: Tod Beardsley Date: Thu, 20 May 2010 14:08:29 +0000 Subject: [PATCH] Fixes #1990. Turns out, we were counting on resolved hostnames, and skipping anything with an unresolved IP address. git-svn-id: file:///home/svn/framework3/trunk@9327 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/db.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/msf/core/db.rb b/lib/msf/core/db.rb index c9fd286bc6..9a81a46629 100644 --- a/lib/msf/core/db.rb +++ b/lib/msf/core/db.rb @@ -1722,6 +1722,7 @@ class DBManager data = f.read(f.stat.size) import_nessus_nbe(data, wspace) end + def import_nessus_nbe(nbe_data, wspace=workspace) nbe_copy = nbe_data.dup # First pass, just to build the address map. @@ -1740,12 +1741,17 @@ class DBManager r = line.split('|') next if r[0] != 'results' hname = r[2] - addr = addr_map[hname] + if addr_map[hname] + addr = addr_map[hname] + else + addr = hname # Must be unresolved, probably an IP address. + end port = r[3] nasl = r[4] type = r[5] data = r[6] + # If there's no resolution, or if it's malformed, skip it. next unless ipv4_validator(addr) # Match the NBE types with the XML severity ratings