From 764bb36f44b2b5b22ebbcb1f1e364ade03b148bc Mon Sep 17 00:00:00 2001 From: HD Moore Date: Mon, 18 Jul 2011 16:05:51 +0000 Subject: [PATCH] Wait a little longer for a session (5 seconds) git-svn-id: file:///home/svn/framework3/trunk@13208 4d416f70-5f16-0410-b530-b9f4589650da --- modules/exploits/windows/smb/ms10_061_spoolss.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/exploits/windows/smb/ms10_061_spoolss.rb b/modules/exploits/windows/smb/ms10_061_spoolss.rb index 2c1d7432af..3c9e784030 100644 --- a/modules/exploits/windows/smb/ms10_061_spoolss.rb +++ b/modules/exploits/windows/smb/ms10_061_spoolss.rb @@ -168,9 +168,15 @@ class Metasploit3 < Msf::Exploit::Remote break if session_created? } - #print_status("Everything should be set, waiting up to two minutes for a session...") print_status("Everything should be set, waiting for a session...") handler + + cnt = 1 + while session_created? == false and cnt < 25 + ::IO.select(nil, nil, nil, 0.25) + cnt += 1 + end + disconnect rescue ::Rex::Proto::SMB::Exceptions::ErrorCode, Rex::ConnectionError @@ -437,3 +443,4 @@ class Metasploit3 < Msf::Exploit::Remote end end +