File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed
modules/auxiliary/admin/oracle Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -44,27 +44,28 @@ def run
44
44
print_status ( "Starting brute force on #{ datastore [ 'RHOST' ] } :#{ datastore [ 'RPORT' ] } ..." )
45
45
46
46
fd = CSV . foreach ( list ) do |brute |
47
+ datastore [ 'DBUSER' ] = brute [ 2 ] . downcase
48
+ datastore [ 'DBPASS' ] = brute [ 3 ] . downcase
47
49
48
- datastore [ 'DBUSER' ] = brute [ 2 ] . downcase
49
- datastore [ 'DBPASS' ] = brute [ 3 ] . downcase
50
-
51
- begin
52
- connect
53
- disconnect
54
- rescue ::OCIError => 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
+ end
55
58
else
56
- if ( not e )
57
- report_auth_info (
59
+ report_auth_info (
58
60
:host => "#{ datastore [ 'RHOST' ] } " ,
59
61
:port => "#{ datastore [ 'RPORT' ] } " ,
60
62
:sname => 'oracle' ,
61
63
:user => "#{ datastore [ 'SID' ] } /#{ datastore [ 'DBUSER' ] } " ,
62
64
:pass => "#{ datastore [ 'DBPASS' ] } " ,
63
65
:active => true
64
- )
65
- print_status ( "Found user/pass of: #{ datastore [ 'DBUSER' ] } /#{ datastore [ 'DBPASS' ] } on #{ datastore [ 'RHOST' ] } with sid #{ datastore [ 'SID' ] } " )
66
- end
67
- end
66
+ )
67
+ print_status ( "Found user/pass of: #{ datastore [ 'DBUSER' ] } /#{ datastore [ 'DBPASS' ] } on #{ datastore [ 'RHOST' ] } with sid #{ datastore [ 'SID' ] } " )
68
+ end
68
69
end
69
70
end
70
71
end
You can’t perform that action at this time.
0 commit comments