Add SSL option -s to msfd

git-svn-id: file:///home/svn/framework3/trunk@6027 4d416f70-5f16-0410-b530-b9f4589650da
unstable
kris 2008-12-19 23:18:39 +00:00
parent 6d1a0993e2
commit 11ffd478d4
2 changed files with 11 additions and 3 deletions

5
msfd
View File

@ -17,6 +17,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" ],
"-s" => [ false, "Use SSL" ],
"-f" => [ false, "Run the daemon in the foreground" ],
"-h" => [ false, "Help banner" ])
@ -32,6 +33,8 @@ arguments.parse(ARGV) { |opt, idx, val|
opts['ServerPort'] = val
when "-f"
foreground = true
when "-s"
opts['SSL'] = true
when "-h"
print(
"\nUsage: #{File.basename(__FILE__)} <options>\n" +
@ -53,4 +56,4 @@ rescue ::NotImplementedError
end
# Run the plugin instance in the foreground.
$framework.plugins.load('msfd', opts).run
$framework.plugins.load('msfd', opts).run

View File

@ -39,6 +39,10 @@ class Plugin::Msfd < Msf::Plugin
#
# The local port to listen on for connections. The default is 55554.
#
# SSL
#
# Use SSL
#
# RunInForeground
#
# Instructs the plugin to now execute the daemon in a worker thread and to
@ -51,7 +55,8 @@ class Plugin::Msfd < Msf::Plugin
# Start listening for connections.
self.server = Rex::Socket::TcpServer.create(
'LocalHost' => opts['ServerHost'] || DefaultHost,
'LocalPort' => opts['ServerPort'] || DefaultPort)
'LocalPort' => opts['ServerPort'] || DefaultPort,
'SSL' => opts['SSL'])
# If the run in foreground flag is not specified, then go ahead and fire
# it off in a worker thread.
@ -124,4 +129,4 @@ protected
end
end
end