@@ -140,11 +140,10 @@ def set_exploit_options(xploit)
140
140
xploit . datastore [ 'DisablePayloadHandler' ] = true
141
141
xploit . datastore [ 'BrowserProfilePrefix' ] = browser_profile_prefix
142
142
xploit . datastore [ 'URIPATH' ] = "/#{ assign_module_resource } "
143
+ xploit . datastore [ 'WORKSPACE' ] = self . workspace
143
144
144
- # TODO: Pass additional parameters
145
- # TODO: Pass WORKSPACE and other options down to the sub module
146
- # TODO: Add BAPv2 tracking information (?)
147
- # TODO: Change exploit output options?
145
+ # TODO: Add BAPv2 tracking information (?) - HD
146
+ # TODO: Change exploit output options? - HD
148
147
end
149
148
150
149
@@ -153,7 +152,7 @@ def set_exploit_options(xploit)
153
152
# @param resource [String] The resource to check.
154
153
# @return [TrueClass] Resource is taken.
155
154
# @return [FalseClass] Resource is not taken.
156
- # TODO: Prevent partial prefix match
155
+ # TODO: Prevent partial prefix match - HD
157
156
def is_resource_taken? ( resource )
158
157
taken = false
159
158
@@ -207,7 +206,7 @@ def sort_bap_exploits
207
206
# @return [Hash] A hash with each module list sorted by disclosure date.
208
207
def sort_date_in_group ( bap_groups )
209
208
bap_groups . each_pair do |ranking , module_list |
210
- # TODO: Handle wonky dates in local modules better
209
+ # TODO: Handle wonky dates in local modules better - HD
211
210
bap_groups [ ranking ] = module_list . sort_by { |m | Date . parse ( m . disclosure_date . to_s ) } . reverse
212
211
end
213
212
end
@@ -335,14 +334,11 @@ def start_payload_listeners
335
334
multi_handler . datastore [ 'SessionExpirationTimeout' ] = datastore [ 'SessionExpirationTimeout' ] if datastore [ 'SessionExpirationTimeout' ]
336
335
multi_handler . datastore [ 'SessionCommunicationTimeout' ] = datastore [ 'SessionCommunicationTimeout' ] if datastore [ 'SessionCommunicationTimeout' ]
337
336
338
-
339
- # TODO: Pass WORKSPACE and other options down to the sub module
340
-
341
337
# Configurable only by BAP
342
338
multi_handler . datastore [ 'ExitOnSession' ] = false
343
339
multi_handler . datastore [ 'EXITFUNC' ] = 'thread'
340
+ multi_handler . datastore [ 'WORKSPACE' ] = self . workspace
344
341
345
- # TODO: BAPv2 specific options / tracking would go here
346
342
347
343
# Now we're ready to start the handler
348
344
multi_handler . exploit_simple (
@@ -697,11 +693,13 @@ def is_ip_targeted?(cli_ip)
697
693
#
698
694
# @return [Fixnum] A session count.
699
695
def session_count
700
- # TODO: Restrict these to the active workspace
701
696
total = 0
702
697
703
698
payload_job_ids . each do |id |
704
- total += framework . jobs [ id . to_s ] . ctx . first . session_count
699
+ job_workspace = framework . jobs [ id . to_s ] . ctx . first . datastore [ 'WORKSPACE' ]
700
+ if job_workspace == self . workspace
701
+ total += framework . jobs [ id . to_s ] . ctx . first . session_count
702
+ end
705
703
end
706
704
707
705
total
0 commit comments