1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-07-18 18:31:41 +02:00

Touchups to msfconsole command parsing

Move from -s to -x and use a semicolon.
This commit is contained in:
Tod Beardsley 2012-09-20 13:34:29 -05:00
parent 56d5c13755
commit cf8edf8570
2 changed files with 5 additions and 5 deletions

View File

@ -251,8 +251,8 @@ class Driver < Msf::Ui::Driver
end
# Process any additional startup commands
if opts['SCommands'] and opts['SCommands'].kind_of? Array
opts['SCommands'].each { |c|
if opts['XCommands'] and opts['XCommands'].kind_of? Array
opts['XCommands'].each { |c|
run_single(c)
}
end

View File

@ -101,9 +101,9 @@ class OptsConsole
options['DisableBanner'] = true
end
opts.on("-s", "-s <string>", "Execute the specified string as console commands") do |s|
options['SCommands'] ||= []
options['SCommands'] += s.split('\n')
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 ""