corrected too much if
parent
862a8fb8aa
commit
08c7b49be0
|
@ -57,24 +57,20 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
if res and res.code == 200
|
||||
re='(version)(\\s+)(.*)(\\s+)(Copyright)'
|
||||
|
||||
m=Regexp.new(re,Regexp::IGNORECASE);
|
||||
matched = m.match(res.body)
|
||||
if matched
|
||||
|
||||
versiontab=matched[3].split('.');
|
||||
if versiontab.count >= 2
|
||||
if (versiontab[0].to_i == 0) and (versiontab[1].to_i <= 84)
|
||||
if versiontab[2].nil? or (versiontab[2].to_i < 2)
|
||||
print_good("Detected Version : #{matched[3]}")
|
||||
return Exploit::CheckCode::Appears
|
||||
end
|
||||
if versiontab.count >= 2 and (versiontab[0].to_i == 0) and (versiontab[1].to_i <= 84)
|
||||
if versiontab[2].nil? or (versiontab[2].to_i < 2)
|
||||
print_good("Detected Version : #{matched[3]}")
|
||||
return Exploit::CheckCode::Vulnerable
|
||||
end
|
||||
end
|
||||
print_error("Detected Version : #{matched[3]}")
|
||||
else
|
||||
return Exploit::CheckCode::Unknown
|
||||
print_error("Detected Version : #{matched[3]}")
|
||||
end
|
||||
else
|
||||
return Exploit::CheckCode::Detected
|
||||
end
|
||||
return Exploit::CheckCode::Safe
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue