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