Fix incorrect use of sock.get that can lead to an indefinite timeout
console1: ``` msf> use auxiliary/scanner/http/open_proxy msf auxiliary(open_proxy) > set RHOSTS 192.168.0.4 msf auxiliary(open_proxy) > set RPORT 8888 msf auxiliary(open_proxy) > run < the connection never times out > ``` console2: ``` $ nc -vlp 8888 Listening on [0.0.0.0] (family 0, port 8888) Connection from [192.168.0.4] port 8888 [tcp/*] accepted (family 2, sport 43245) GET http://209.85.148.147/ HTTP/1.1 Host: 209.85.148.147 Connection: close User-Agent: user_agent Accept-Encoding: * Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7 Cache-Control: no Accept-Language: de,en;q=0.7,en-us;q=0.3 ``` After the patch, requests timeout after 10 seconds: ``` msf auxiliary(open_proxy) > run [*] Scanned 1 of 1 hosts (100% complete) [*] Auxiliary module execution completed ```bug/bundler_fix
parent
3e1ac3fee1
commit
43420aa984
|
@ -115,7 +115,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
|
||||
request = write_request('GET',site,user_agent)
|
||||
sock.put(request)
|
||||
res = sock.get
|
||||
res = sock.get_once(-1, 10)
|
||||
|
||||
disconnect
|
||||
|
||||
|
|
Loading…
Reference in New Issue