Initialize framework after forking when running msfrpcd as a daemon. Fixes #2465 by running database task thread in daemon.
git-svn-id: file:///home/svn/framework3/trunk@10207 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
21540e22ed
commit
9e86da570e
Binary file not shown.
|
@ -294,7 +294,7 @@ public class RpcConnection {
|
|||
setMessage("Connecting to new msfrpcd...");
|
||||
setProgress(0.7f);
|
||||
boolean connected = false;
|
||||
for (int tries = 0; tries < 10; tries++) { //it usually takes a second to get started
|
||||
for (int tries = 0; tries < 1000; tries++) { //it usually takes a minute to get started
|
||||
try {
|
||||
myRpcConn = new RpcConnection(defaultUser, defaultPass.toCharArray(), "127.0.0.1", defaultPort);
|
||||
connected = true;
|
||||
|
|
9
msfrpcd
9
msfrpcd
|
@ -78,12 +78,6 @@ $stderr.puts "[*] XMLRPC starting on #{opts['ServerHost']}:#{opts['ServerPort']}
|
|||
|
||||
$stderr.puts "[*] URI: #{opts['URI']}" if(opts['URI'])
|
||||
|
||||
# Create an instance of the framework
|
||||
$framework = Msf::Simple::Framework.create
|
||||
|
||||
$stderr.puts "[*] XMLRPC initializing..."
|
||||
|
||||
|
||||
# Fork into the background if requested
|
||||
begin
|
||||
if (not foreground)
|
||||
|
@ -94,5 +88,8 @@ rescue ::NotImplementedError
|
|||
$stderr.puts "[-] Background mode is not available on this platform"
|
||||
end
|
||||
|
||||
# Create an instance of the framework
|
||||
$framework = Msf::Simple::Framework.create
|
||||
|
||||
# Run the plugin instance in the foreground.
|
||||
$framework.plugins.load('xmlrpc', opts).run
|
||||
|
|
Loading…
Reference in New Issue