Skip to content
Browse files

Touchups to msfconsole command parsing

Move from -s to -x and use a semicolon.
  • Loading branch information...
1 parent d7727c8 commit 1f9013047571997e64a02c8c44cffcafa9339e49 @todb todb committed Sep 20, 2012
Showing with 5 additions and 5 deletions.
  1. +2 −2 lib/msf/ui/console/driver.rb
  2. +3 −3 msfconsole
View
4 lib/msf/ui/console/driver.rb
@@ -251,8 +251,8 @@ def initialize(prompt = DefaultPrompt, prompt_char = DefaultPromptChar, opts = {
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
6 msfconsole
@@ -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 ""

0 comments on commit 1f90130

Please sign in to comment.
Something went wrong with that request. Please try again.