From 27cda778a8eb1d189113a0c470618c61f417f560 Mon Sep 17 00:00:00 2001 From: James Lee Date: Wed, 24 Feb 2010 22:54:16 +0000 Subject: [PATCH] mark hosts as alive when adding notes or services git-svn-id: file:///home/svn/framework3/trunk@8627 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/db.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/msf/core/db.rb b/lib/msf/core/db.rb index e918d25150..3c8221953e 100644 --- a/lib/msf/core/db.rb +++ b/lib/msf/core/db.rb @@ -263,6 +263,9 @@ class DBManager task = queue(Proc.new { host = get_host(:workspace => wspace, :address => addr) + host.state = HostState::Alive + host.save! if host.changed? + proto = opts[:proto] || 'tcp' opts[:name].downcase! if (opts[:name]) @@ -430,6 +433,8 @@ class DBManager if addr and not host host = get_host(:workspace => wspace, :host => addr) end + host.state = HostState::Alive + host.save! if host.changed? ntype = opts.delete(:type) || opts.delete(:ntype) || return data = opts[:data] || return