From f45e03cd14467c42117b9dd70ac6d9fe30d86546 Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Mon, 13 Dec 2010 23:34:43 +0000 Subject: [PATCH] remove wait when DisablePayloadHandler was set git-svn-id: file:///home/svn/framework3/trunk@11324 4d416f70-5f16-0410-b530-b9f4589650da --- lib/msf/core/exploit_driver.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/msf/core/exploit_driver.rb b/lib/msf/core/exploit_driver.rb index 9214b15401..b89ba28256 100644 --- a/lib/msf/core/exploit_driver.rb +++ b/lib/msf/core/exploit_driver.rb @@ -222,7 +222,10 @@ protected # Wait the payload to acquire a session if this isn't a passive-style # exploit. - if (exploit.passive? == false or force_wait_for_session == true) + return if not + + if (force_wait_for_session == true) or + (exploit.passive? == false and exploit.handler_enabled?) begin self.session = payload.wait_for_session(delay) rescue ::Interrupt