Skip to content

Commit 6482083

Browse files
author
Brent Cook
committed
revert WfsDelay short-circuit on exploit failure
Some exploits currently succeed, but can fail during cleanup, leading to a false-negative. Reverting this so that the affected exploits can be fixed first. This reverts commits b0858e9 and b3f7541.
1 parent 1bd4721 commit 6482083

File tree

3 files changed

+3
-24
lines changed

3 files changed

+3
-24
lines changed

lib/msf/base/simple/exploit.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,6 @@ def handle_exception e
237237

238238
# Report the failure (and attempt) in the database
239239
self.report_failure
240-
241-
# Interrupt any session waiters in the handler
242-
self.interrupt_handler
243240
end
244241
#
245242
# Calls the class method.

lib/msf/core/exploit.rb

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,19 +1193,9 @@ def handler_enabled?
11931193
# value can be one of the Handler::constants.
11941194
#
11951195
def 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()
1196+
return if not payload_instance
1197+
return if not handler_enabled?
1198+
return payload_instance.handler(*args)
12091199
end
12101200

12111201
##

lib/msf/core/handler.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,6 @@ def wait_for_session(t = wfs_delay)
162162
return session
163163
end
164164

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-
173165
#
174166
# Set by the exploit module to configure handler
175167
#

0 commit comments

Comments
 (0)