adds a patch from Thomas Ring.

git-svn-id: file:///home/svn/framework3/trunk@8775 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Mario Ceballos 2010-03-10 22:42:49 +00:00
parent d3da883aa2
commit b01f9ff233
1 changed files with 27 additions and 23 deletions

View File

@ -15,7 +15,7 @@ class Metasploit3 < Msf::Auxiliary
def initialize(info = {}) def initialize(info = {})
super(update_info(info, super(update_info(info,
'Name' => 'SID Enumeration.', 'Name' => 'Oracle SID Enumeration.',
'Description' => %q{ 'Description' => %q{
This module simply queries the TNS listner for the Oracle SID. This module simply queries the TNS listner for the Oracle SID.
With Oracle 9.2.0.8 and above the listener will be protected and With Oracle 9.2.0.8 and above the listener will be protected and
@ -46,29 +46,33 @@ class Metasploit3 < Msf::Auxiliary
if ( data and data =~ /ERROR_STACK/ ) if ( data and data =~ /ERROR_STACK/ )
print_error("TNS listener protected for #{ip}...") print_error("TNS listener protected for #{ip}...")
else else
sid = data.scan(/INSTANCE_NAME=([^\)]+)/) if(not data)
sid.uniq.each do |s| print_error("#{ip} Connection but no data")
report_note( else
:host => ip, sid = data.scan(/INSTANCE_NAME=([^\)]+)/)
:proto => 'tcp', sid.uniq.each do |s|
:port => datastore['RPORT'], report_note(
:type => 'INSTANCE_NAME', :host => ip,
:data => "#{s}" :proto => 'tcp',
) :port => datastore['RPORT'],
print_status("Identified SID for #{ip}: #{s}") :type => 'INSTANCE_NAME',
end :data => "#{s}"
)
print_status("Identified SID for #{ip}: #{s}")
end
service_name = data.scan(/SERVICE_NAME=([^\)]+)/)
service_name.each do |s|
report_note(
:host => ip,
:proto => 'tcp',
:port => datastore['RPORT'],
:type => 'SERVICE_NAME',
:data => "#{s}"
)
print_status("Identified SERVICE_NAME for #{ip}: #{s}")
end
end
end end
service_name = data.scan(/SERVICE_NAME=([^\)]+)/)
service_name.each do |s|
report_note(
:host => ip,
:proto => 'tcp',
:port => datastore['RPORT'],
:type => 'SERVICE_NAME',
:data => "#{s}"
)
print_status("Identified SERVICE_NAME for #{ip}: #{s}")
end
disconnect disconnect
rescue ::Rex::ConnectionError rescue ::Rex::ConnectionError
rescue ::Errno::EPIPE rescue ::Errno::EPIPE