Shortening an over-200 long line for readability

It's a contrived fix, but scrolling over is a hassle. This comes up a
lot in long regexes, not sure the best way to address these.
unstable
Tod Beardsley 2012-08-14 12:25:21 -05:00
parent bfe2ed0737
commit 6597d25726
1 changed files with 9 additions and 1 deletions

View File

@ -71,7 +71,15 @@ class Metasploit3 < Msf::Exploit::Remote
})
return Exploit::CheckCode::Unknown if res.nil?
return Exploit::CheckCode::Vulnerable if res and res.code == 200 and res.body =~ /<p><img alt="Company logo" title="logo" style="width: 115px; height: 53px;"\s+src="[^"]+" \/>\s+<br \/>TestLink 1\.9\.3/
if res
if res.code == 200
if res.body =~ /<p><img alt="Company logo" title="logo" style="width: 115px; height: 53px;"\s+src="[^"]+" \/>\s+<br \/>TestLink 1\.9\.3/
return Exploit::CheckCode::Vulnerable
end
end
end
return Exploit::CheckCode::Detected if res and res.body =~ /TestLink project <a href="http:\/\/testlink\.sourceforge\.net\/docs\/testLink\.php">Home<\/a><br \/>/
return Exploit::CheckCode::Safe
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout