File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
modules/auxiliary/admin/oracle Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,14 @@ def run
41
41
42
42
print_status ( "Starting brute force on #{ rhost } , using sids from #{ list } ..." )
43
43
44
- fd = File . open ( list , 'rb' ) . each do |sid |
44
+ fd = :: File . open ( list , 'rb' ) . each do |sid |
45
45
login = "(DESCRIPTION=(CONNECT_DATA=(SID=#{ sid } )(CID=(PROGRAM=)(HOST=MSF)(USER=)))(ADDRESS=(PROTOCOL=tcp)(HOST=#{ rhost } )(PORT=#{ rport } )))"
46
46
pkt = tns_packet ( login )
47
47
48
48
begin
49
49
connect
50
+ rescue ::Interrupt
51
+ raise $!
50
52
rescue => e
51
53
print_error ( e . to_s )
52
54
disconnect
@@ -55,12 +57,10 @@ def run
55
57
56
58
sock . put ( pkt )
57
59
select ( nil , nil , nil , s . to_i )
58
- res = sock . get_once ( - 1 , 3 )
60
+ res = sock . get_once
59
61
disconnect
60
62
61
- if ( res and res =~ /ERROR_STACK/ )
62
- ''
63
- else
63
+ if res and res . to_s !~ /ERROR_STACK/
64
64
report_note (
65
65
:host => rhost ,
66
66
:port => rport ,
@@ -70,6 +70,7 @@ def run
70
70
)
71
71
print_good ( "#{ rhost } :#{ rport } Found SID '#{ sid . strip } '" )
72
72
end
73
+
73
74
end
74
75
75
76
print_status ( "Done with brute force..." )
You can’t perform that action at this time.
0 commit comments