From ac9b0edf94ecd645d06a64428eb7d513f3cc5953 Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Thu, 3 Nov 2005 00:18:12 +0000 Subject: [PATCH] bug fix git-svn-id: file:///home/svn/incoming/trunk@3012 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/exploit_driver.rb | 2 +- lib/msf/core/session.rb | 8 ++++++++ lib/msf/core/session/interactive.rb | 6 +++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/msf/core/exploit_driver.rb b/lib/msf/core/exploit_driver.rb index eb484be11d..58eb23c728 100644 --- a/lib/msf/core/exploit_driver.rb +++ b/lib/msf/core/exploit_driver.rb @@ -135,7 +135,7 @@ class ExploitDriver 'Payload' => payload.refname) # Call the exploit success handler - framework.events.on_exploit_success(exploit, session) + exploit.framework.events.on_exploit_success(exploit, session) end return session diff --git a/lib/msf/core/session.rb b/lib/msf/core/session.rb index 9ddb6e8b99..0f8721b7e4 100644 --- a/lib/msf/core/session.rb +++ b/lib/msf/core/session.rb @@ -123,10 +123,18 @@ module Session "session_#{name.to_s}" end + # + # This method logs the supplied buffer as coming from the remote side of + # the session. + # def log_from_remote(buf) rlog(buf, log_source) end + # + # This method logs the supplied buffer as coming from the local side of + # the session. + # def log_from_local(buf) rlog(buf, log_source) end diff --git a/lib/msf/core/session/interactive.rb b/lib/msf/core/session/interactive.rb index feb88ffcb5..d24f6a8553 100644 --- a/lib/msf/core/session/interactive.rb +++ b/lib/msf/core/session/interactive.rb @@ -43,7 +43,11 @@ module Interactive # Returns the remote peer information # def tunnel_peer - rstream.peerinfo + begin + rstream.peerinfo + rescue + framework.sessions.deregister(sid) + end end #