From 9cdef831bb7417abd5a6946d58812ba2dcd23317 Mon Sep 17 00:00:00 2001 From: James Lee Date: Thu, 7 Jan 2010 19:14:44 +0000 Subject: [PATCH] use the new database api. fixes 753 git-svn-id: file:///home/svn/framework3/trunk@8086 4d416f70-5f16-0410-b530-b9f4589650da --- plugins/db_tracker.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/db_tracker.rb b/plugins/db_tracker.rb index a144f779d6..898aea5ea1 100644 --- a/plugins/db_tracker.rb +++ b/plugins/db_tracker.rb @@ -30,15 +30,10 @@ class Plugin::DB_Tracer < Msf::Plugin # to hold the framework in 'Msf' return if not param.context['Msf'] - host = param.context['Msf'].db.get_host(param.context, sock.peerhost) + host = param.context['Msf'].db.find_or_create_host(:host => sock.peerhost, :state => Msf::HostState::Alive) return if not host - port = param.context['Msf'].db.get_service(param.context, host, param.proto, sock.peerport) - return if not port - - if host.state != Msf::HostState::Alive - param.context['Msf'].db.report_host_state(self, sock.peerhost, Msf::HostState::Alive) - end + param.context['Msf'].db.report_service(:host => host, :proto => param.proto, :port => sock.peerport) end end end