fix potential hang when server doesn't respond

git-svn-id: file:///home/svn/framework3/trunk@7602 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2009-11-25 02:01:27 +00:00
parent 825cbfca66
commit 07543fd526
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ class Metasploit3 < Msf::Auxiliary
connect
sock.put("GET /ver.asp HTTP/1.0\r\n\r\n")
response = sock.get
response = sock.get_once
disconnect

View File

@ -103,9 +103,9 @@ class Metasploit3 < Msf::Exploit::Remote
def check
connect
sock.put(build_packet(156))
res = sock.get
res = sock.get_once
if res =~ /MoretonBay/
if res and res =~ /MoretonBay/
return Exploit::CheckCode::Detected
end