Skip to content

Commit

Permalink
Move the fork AFTER the framework instance has been created
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/svn/framework3/trunk@12498 4d416f70-5f16-0410-b530-b9f4589650da
  • Loading branch information
HD Moore committed May 2, 2011
1 parent 91658ac commit 078fb3e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions msfrpcd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit 078fb3e

Please sign in to comment.