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