File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,9 @@ def handle_exception e
237
237
238
238
# Report the failure (and attempt) in the database
239
239
self . report_failure
240
+
241
+ # Interrupt any session waiters in the handler
242
+ self . interrupt_handler
240
243
end
241
244
#
242
245
# Calls the class method.
Original file line number Diff line number Diff line change @@ -1193,9 +1193,19 @@ def handler_enabled?
1193
1193
# value can be one of the Handler::constants.
1194
1194
#
1195
1195
def handler ( *args )
1196
- return if not payload_instance
1197
- return if not handler_enabled?
1198
- return payload_instance . handler ( *args )
1196
+ return unless payload_instance
1197
+ return unless handler_enabled?
1198
+ payload_instance . handler ( *args )
1199
+ end
1200
+
1201
+ #
1202
+ # Break out of the session wait loop (WfsDelay)
1203
+ #
1204
+ def interrupt_handler
1205
+ return unless payload_instance
1206
+ return unless handler_enabled?
1207
+ return unless payload_instance . respond_to? ( :interrupt_wait_for_session )
1208
+ payload_instance . interrupt_wait_for_session ( )
1199
1209
end
1200
1210
1201
1211
##
Original file line number Diff line number Diff line change @@ -162,6 +162,14 @@ def wait_for_session(t = wfs_delay)
162
162
return session
163
163
end
164
164
165
+ #
166
+ # Interrupts a wait_for_session call by notifying with a nil event
167
+ #
168
+ def interrupt_wait_for_session
169
+ return unless session_waiter_event
170
+ session_waiter_event . notify ( nil )
171
+ end
172
+
165
173
#
166
174
# Set by the exploit module to configure handler
167
175
#
You can’t perform that action at this time.
0 commit comments