From 4c0c282cf854e047410b325d07868da1c545d48c Mon Sep 17 00:00:00 2001 From: HD Moore Date: Fri, 22 Apr 2011 19:27:50 +0000 Subject: [PATCH] Fix a stack trace when one of these is nil git-svn-id: file:///home/svn/framework3/trunk@12406 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/model/host.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msf/core/model/host.rb b/lib/msf/core/model/host.rb index a4359dedbc..6dd881f042 100644 --- a/lib/msf/core/model/host.rb +++ b/lib/msf/core/model/host.rb @@ -775,7 +775,7 @@ protected else # family often contains the vendor string, so rip it out to # avoid useless duplication - ret[:os_name] = data[:vendor] + " " + data[:family].gsub(data[:vendor], '').strip + ret[:os_name] = data[:vendor].to_s + " " + data[:family].to_s.gsub(data[:vendor].to_s, '').strip end when "Windows" ret[:os_name] = "Microsoft Windows"