diff --git a/lib/msf/ui/console/command_dispatcher/core.rb b/lib/msf/ui/console/command_dispatcher/core.rb index 40c160693d..161436f2af 100644 --- a/lib/msf/ui/console/command_dispatcher/core.rb +++ b/lib/msf/ui/console/command_dispatcher/core.rb @@ -1703,6 +1703,14 @@ class Core global = true end + # Decide if this is an append operation + append = false + + if (args[0] == '-a') + args.shift + append = true + end + # Determine which data store we're operating on if (active_module and global == false) datastore = active_module.datastore @@ -1760,9 +1768,13 @@ class Core return true end - datastore[name] = value + if append + datastore[name] = datastore[name] + value + else + datastore[name] = value + end - print_line("#{name} => #{value}") + print_line("#{name} => #{datastore[name]}") end # @@ -2278,7 +2290,7 @@ class Core # Returns the revision of the framework and console library # def cmd_version(*args) - svn_console_version = "$Revision: 14065 $" + svn_console_version = "$Revision: 15168 $" svn_metasploit_version = Msf::Framework::Revision.match(/ (.+?) \$/)[1] rescue nil if svn_metasploit_version print_line("Framework: #{Msf::Framework::Version}.#{svn_metasploit_version}")