Skip to content

Commit 67efa76

Browse files
committed
changes based on feedback
1 parent e23acf8 commit 67efa76

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

modules/auxiliary/admin/oracle/oracle_login.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ def run
5252
connect
5353
disconnect
5454
rescue ::OCIError => e
55-
if (e.to_s == 'ORA-12170: TNS:Connect timeout occurred')
56-
break
57-
else
58-
if (not e)
55+
break if e.to_s =~ /^ORA-12170:\s/
56+
unless e
5957
report_auth_info(
6058
:host => "#{datastore['RHOST']}",
6159
:port => "#{datastore['RPORT']}",
@@ -65,8 +63,7 @@ def run
6563
:active => true
6664
)
6765
print_status("Found user/pass of: #{datastore['DBUSER']}/#{datastore['DBPASS']} on #{datastore['RHOST']} with sid #{datastore['SID']}")
68-
end
69-
end
66+
end
7067
end
7168
end
7269
end

0 commit comments

Comments
 (0)