record a vuln when opening a session. the format may need some more thought

git-svn-id: file:///home/svn/framework3/trunk@8066 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2010-01-04 21:54:32 +00:00
parent cb4ab4b0f6
commit 58cfcd99f8
1 changed files with 11 additions and 1 deletions

View File

@ -34,6 +34,16 @@ module FrameworkEventManager
if (Msf::Logging.session_logging_enabled? == true)
Msf::Logging.start_session_log(session)
end
# Since we got a session, we know the host is vulnerable to something.
# If the exploit used was multi/handler, though, we don't know what
# it's vulnerable to, so it isn't really useful to save it.
if framework.db.active and session.via_exploit and session.via_exploit != "multi/handler"
info = {
:host => session.tunnel_peer.sub(/:\d+$/, ''), # strip off the port
:name => session.via_exploit
}
framework.db.report_vuln(info)
end
end
#
@ -54,4 +64,4 @@ end
end
end
end
end