File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
modules/auxiliary/scanner/rsync Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -58,17 +58,18 @@ def read_timeout
58
58
datastore [ 'READ_TIMEOUT' ]
59
59
end
60
60
61
- def get_rsync_auth_state ( rmodule )
61
+ def get_rsync_auth_status ( rmodule )
62
62
sock . puts ( "#{ rmodule } \n " )
63
63
res = sock . get_once ( -1 , read_timeout )
64
64
if res
65
- if res =~ /^#{ RSYNC_HEADER } AUTHREQD/
65
+ res . strip!
66
+ if res =~ /^#{ RSYNC_HEADER } AUTHREQD \S +$/
66
67
'required'
67
- elsif res =~ /^#{ RSYNC_HEADER } OK/
68
+ elsif res =~ /^#{ RSYNC_HEADER } OK$ /
68
69
'not required'
69
70
else
70
71
vprint_error ( "#{ peer } - unexpected response when connecting to #{ rmodule } : #{ res } " )
71
- ' unexpected response'
72
+ " unexpected response ' #{ res } '"
72
73
end
73
74
else
74
75
vprint_error ( "#{ peer } - no response when connecting to #{ rmodule } " )
@@ -185,12 +186,12 @@ def run_host(ip)
185
186
186
187
table_columns = %w( Name Comment )
187
188
if datastore [ 'TEST_AUTHENTICATION' ]
188
- table_columns << 'Authentication? '
189
+ table_columns << 'Authentication'
189
190
modules_metadata . each do |module_metadata |
190
191
begin
191
192
connect
192
193
rsync_negotiate
193
- module_metadata [ :authentication? ] = get_rsync_auth_state ( module_metadata [ :name ] )
194
+ module_metadata [ :authentication ] = get_rsync_auth_status ( module_metadata [ :name ] )
194
195
rescue => e
195
196
vprint_error ( "#{ peer } - error while testing authentication on #{ module_metadata [ :name ] } : #{ e } " )
196
197
ensure
You can’t perform that action at this time.
0 commit comments