Add some error handling for tns_version method

unstable
Joshua J. Drake 2012-01-19 13:03:19 -06:00
parent 8ce47ab832
commit 292332d355
1 changed files with 4 additions and 2 deletions

View File

@ -80,7 +80,7 @@ class Metasploit3 < Msf::Exploit::Remote
def check
version = tns_version
if (not version)
raise RuntimeError, "Unable to detect version!"
raise RuntimeError, "Unable to detect the Oracle version!"
end
print_status("Oracle version reply: " + version)
return Exploit::CheckCode::Vulnerable if (version =~ /32-bit Windows: Version 10\.2\.0\.1\.0/)
@ -97,7 +97,7 @@ class Metasploit3 < Msf::Exploit::Remote
version = tns_version
if (not version)
raise RuntimeError, "Unable to detect version!"
raise RuntimeError, "Unable to detect the Oracle version!"
end
if (version =~ /32-bit Windows: Version 10\.2\.0\.1\.0/)
@ -253,6 +253,8 @@ class Metasploit3 < Msf::Exploit::Remote
res = sock.get_once(-1, 1)
disconnect
return res
rescue EOFError
return nil
end