set a recommended number of threads per session type

bug/bundler_fix
Brent Cook 2016-03-17 23:22:41 -05:00
parent 9268f66540
commit f466464e80
2 changed files with 6 additions and 0 deletions

View File

@ -50,6 +50,7 @@ class CommandShell
def initialize(*args) def initialize(*args)
self.platform ||= "" self.platform ||= ""
self.arch ||= "" self.arch ||= ""
self.max_threads = 1
super super
end end
@ -235,6 +236,7 @@ class CommandShell
attr_accessor :arch attr_accessor :arch
attr_accessor :platform attr_accessor :platform
attr_accessor :max_threads
protected protected

View File

@ -69,6 +69,9 @@ class Meterpreter < Rex::Post::Meterpreter::Client
# Don't pass the datastore into the init_meterpreter method # Don't pass the datastore into the init_meterpreter method
opts.delete(:datastore) opts.delete(:datastore)
# Assume by default that 10 threads is a safe number for this session
self.max_threads ||= 10
# #
# Initialize the meterpreter client # Initialize the meterpreter client
# #
@ -488,6 +491,7 @@ class Meterpreter < Rex::Post::Meterpreter::Client
attr_accessor :skip_ssl attr_accessor :skip_ssl
attr_accessor :skip_cleanup attr_accessor :skip_cleanup
attr_accessor :target_id attr_accessor :target_id
attr_accessor :max_threads
protected protected