Move the fork AFTER the framework instance has been created

git-svn-id: file:///home/svn/framework3/trunk@12498 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2011-05-02 02:55:26 +00:00
parent 91658ac45e
commit 078fb3e7ae
1 changed files with 3 additions and 2 deletions

View File

@ -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.