Skip to content

Commit f466464

Browse files
author
Brent Cook
committed
set a recommended number of threads per session type
1 parent 9268f66 commit f466464

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/msf/base/sessions/command_shell.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def self.type
5050
def initialize(*args)
5151
self.platform ||= ""
5252
self.arch ||= ""
53+
self.max_threads = 1
5354
super
5455
end
5556

@@ -235,6 +236,7 @@ def reset_ring_sequence
235236

236237
attr_accessor :arch
237238
attr_accessor :platform
239+
attr_accessor :max_threads
238240

239241
protected
240242

lib/msf/base/sessions/meterpreter.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ def initialize(rstream, opts={})
6969
# Don't pass the datastore into the init_meterpreter method
7070
opts.delete(:datastore)
7171

72+
# Assume by default that 10 threads is a safe number for this session
73+
self.max_threads ||= 10
74+
7275
#
7376
# Initialize the meterpreter client
7477
#
@@ -488,6 +491,7 @@ def create(param)
488491
attr_accessor :skip_ssl
489492
attr_accessor :skip_cleanup
490493
attr_accessor :target_id
494+
attr_accessor :max_threads
491495

492496
protected
493497

0 commit comments

Comments
 (0)