Fix db_tracker to ignore sockets without 'Msf' in their context to prevent

it from generating errors


git-svn-id: file:///home/svn/framework3/trunk@6475 4d416f70-5f16-0410-b530-b9f4589650da
unstable
kris 2009-04-11 12:00:12 +00:00
parent 162a835212
commit a785add956
1 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,10 @@ class Plugin::DB_Tracer < Msf::Plugin
if (sock.peerhost != '0.0.0.0' and sock.peerport) if (sock.peerhost != '0.0.0.0' and sock.peerport)
# Ignore sockets that didn't set up their context
# 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.get_host(param.context, sock.peerhost)
return if not host return if not host