Skip to content

Commit

Permalink
performance: parse args before loading everything
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/svn/framework3/trunk@10774 4d416f70-5f16-0410-b530-b9f4589650da
  • Loading branch information
jduck committed Oct 21, 2010
1 parent 0e04505 commit 9278035
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions msfrpc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ end
$:.unshift(File.join(File.dirname(msfbase), 'lib'))
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']

require 'msf/core/rpc'
require 'rex/ui'
require 'rex/parser/arguments'

# Declare the argument parser for msfrpc
arguments = Rex::Parser::Arguments.new(
Expand Down Expand Up @@ -70,6 +69,9 @@ end
$0 = "msfrpc"


require 'msf/core/rpc'
require 'rex/ui'

rpc = Msf::RPC::Client.new(
:host => opts['ServerHost'],
:port => opts['ServerPort'],
Expand Down
6 changes: 4 additions & 2 deletions msfrpcd
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ end
$:.unshift(File.join(File.dirname(msfbase), 'lib'))
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']

require 'msf/base'
require 'msf/ui'
require 'rex/parser/arguments'

# Declare the argument parser for msfrpcd
arguments = Rex::Parser::Arguments.new(
Expand Down Expand Up @@ -78,6 +77,9 @@ $stderr.puts "[*] XMLRPC starting on #{opts['ServerHost']}:#{opts['ServerPort']}

$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

Expand Down

0 comments on commit 9278035

Please sign in to comment.