Add some error handling for tns_version method
parent
8ce47ab832
commit
292332d355
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue