Adding kernelsmith's -a datastore opt
Works well enough on its own. Note that you cannot mix -g and -a since set doesn't actually parse out dash options in a OptParse sort of way. That said, setg -a seems to work well. This mixing options business will need to be addressed soon, but that day is not today. [Closes #514]unstable
commit
dfe0e10dc6
|
@ -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}")
|
||||
|
|
Loading…
Reference in New Issue