From 078fb3e7aeaa5755cc01fa2d39c766aff53b8580 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Mon, 2 May 2011 02:55:26 +0000 Subject: [PATCH] Move the fork AFTER the framework instance has been created git-svn-id: file:///home/svn/framework3/trunk@12498 4d416f70-5f16-0410-b530-b9f4589650da --- msfrpcd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/msfrpcd b/msfrpcd index d30d533b84..22553b71d0 100755 --- a/msfrpcd +++ b/msfrpcd @@ -84,8 +84,6 @@ $stderr.puts "[*] URI: #{opts['URI']}" if(opts['URI']) require 'msf/base' require 'msf/ui' -# Create an instance of the framework -$framework = Msf::Simple::Framework.create(frameworkOpts) # Fork into the background if requested begin @@ -99,6 +97,9 @@ rescue ::NotImplementedError $stderr.puts "[-] Background mode is not available on this platform" end +# Create an instance of the framework +$framework = Msf::Simple::Framework.create(frameworkOpts) + $framework.db.sink.restart if RUBY_PLATFORM !~ /cygwin/ and not frameworkOpts['DisableDatabase'] # Run the plugin instance in the foreground.