mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-10-09 04:26:11 +02:00
fix for a few bugs
git-svn-id: file:///home/svn/incoming/trunk@3148 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
f9b21aeb36
commit
6d9e050b6c
@ -35,10 +35,12 @@ class Logging
|
||||
# Enables a log source.
|
||||
#
|
||||
def self.enable_log_source(src, level = 0)
|
||||
f = Rex::Logging::Sinks::Flatfile.new(
|
||||
Msf::Config.log_directory + File::SEPARATOR + "#{src}.log")
|
||||
|
||||
register_log_source(src, f, level)
|
||||
if (log_source_registered?(src) == false)
|
||||
f = Rex::Logging::Sinks::Flatfile.new(
|
||||
Msf::Config.log_directory + File::SEPARATOR + "#{src}.log")
|
||||
|
||||
register_log_source(src, f, level)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
|
@ -153,6 +153,10 @@ def rlog(msg, src = 'core', level = 0, from = caller)
|
||||
$dispatcher.log(LOG_RAW, src, level, msg, from)
|
||||
end
|
||||
|
||||
def log_source_registered?(src)
|
||||
($dispatcher[src] != nil)
|
||||
end
|
||||
|
||||
def register_log_source(src, sink, level = nil)
|
||||
$dispatcher[src] = sink
|
||||
|
||||
|
1
msfd
1
msfd
@ -9,6 +9,7 @@ require 'msf/ui'
|
||||
arguments = Rex::Parser::Arguments.new(
|
||||
"-a" => [ true, "Bind to this IP address instead of loopback" ],
|
||||
"-p" => [ true, "Bind to this port instead of 55554" ],
|
||||
"-f" => [ false, "Run the daemon in the foreground" ],
|
||||
"-h" => [ false, "Help banner" ])
|
||||
|
||||
opts = {}
|
||||
|
Loading…
Reference in New Issue
Block a user