Merge remote branch 'kernelsmith/msfconsole-s'

unstable
Tod Beardsley 2012-09-20 14:31:55 -05:00
commit b1ce969c95
2 changed files with 12 additions and 0 deletions

View File

@ -249,6 +249,13 @@ class Driver < Msf::Ui::Driver
# If the opt is nil here, we load ~/.msf3/msfconsole.rc
load_resource(opts['Resource'])
end
# Process any additional startup commands
if opts['XCommands'] and opts['XCommands'].kind_of? Array
opts['XCommands'].each { |c|
run_single(c)
}
end
end
#

View File

@ -101,6 +101,11 @@ class OptsConsole
options['DisableBanner'] = true
end
opts.on("-x", "-x <command>", "Execute the specified string as console commands (use ; for multiples)") do |s|
options['XCommands'] ||= []
options['XCommands'] += s.split(/\s*;\s*/)
end
opts.separator ""
opts.separator "Common options:"