msfd fixes

git-svn-id: file:///home/svn/incoming/trunk@3150 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Miller 2005-11-28 20:41:11 +00:00
parent dd871eae5c
commit 5a42b1d86b
5 changed files with 11 additions and 11 deletions

View File

@ -68,12 +68,14 @@ class Logging
# Starts logging for a given session.
#
def self.start_session_log(session)
f = Rex::Logging::Sinks::Flatfile.new(
if (log_source_registered?(session.log_source) == false)
f = Rex::Logging::Sinks::Flatfile.new(
Msf::Config.session_log_directory + File::SEPARATOR + "#{session.log_file_name}.log")
register_log_source(session.log_source, f)
rlog("\n[*] Logging started: #{Time.now}\n\n", session.log_source)
register_log_source(session.log_source, f)
rlog("\n[*] Logging started: #{Time.now}\n\n", session.log_source)
end
end
#

View File

@ -143,7 +143,7 @@ module Handler
session = session_waiter_event.wait(t)
rescue ::TimeoutError
end
# If a connection has arrived, wait longer...
if (pending_connections > 0)
session = session_waiter_event.wait

View File

@ -321,8 +321,8 @@ class Payload < Msf::Module
# that a session has been created and potentially shut down any
# open sockets. This allows active exploits to continue hammering
# on a service until a session is created.
if (assoc_exploit)
if (assoc_exploit)
# Signal that a new session is created by calling the exploit's
# on_new_session handler. The default behavior is to set an
# instance variable, which the exploit will have to check.

View File

@ -553,7 +553,7 @@ class Core
print_status("Starting interaction with #{session.name}...\n") if (quiet == false)
# Set the session's input and output handles
session.init_ui(driver.input, driver.output)
session.init_ui(driver.input.dup, driver.output)
# Interact
session.interact()

View File

@ -33,8 +33,6 @@ module FrameworkEventManager
if (Msf::Logging.session_logging_enabled? == true)
Msf::Logging.start_session_log(session)
output.print_status("Started logging session interaction.")
end
end