Skip to content

Commit

Permalink
Initialize framework after forking when running msfrpcd as a daemon. F…
Browse files Browse the repository at this point in the history
…ixes rapid7#2465 by running database task thread in daemon.

git-svn-id: file:///home/svn/framework3/trunk@10207 4d416f70-5f16-0410-b530-b9f4589650da
  • Loading branch information
scriptjunkie committed Aug 31, 2010
1 parent 21540e2 commit 9e86da5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Binary file modified data/gui/msfgui.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ protected RpcConnection doInBackground() throws Exception {
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;
Expand Down
9 changes: 3 additions & 6 deletions msfrpcd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

0 comments on commit 9e86da5

Please sign in to comment.