We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1a79bd commit 0ae2e64Copy full SHA for 0ae2e64
modules/auxiliary/scanner/rsync/modules_list.rb
@@ -60,11 +60,20 @@ def read_timeout
60
def rsync_requires_auth?(rmodule)
61
sock.puts("#{rmodule}\n")
62
res = sock.get_once(-1, read_timeout)
63
- if res && (res =~ /^#{RSYNC_HEADER} AUTHREQD/)
64
- true
+ if res
+ if res =~ /^#{RSYNC_HEADER} AUTHREQD/
65
+ true
66
+ elsif res =~ /^#{RSYNC_HEADER} OK/
67
+ false
68
+ else
69
+ vprint_error("#{peer} - unexpected response when connecting to #{rmodule}: #{res}")
70
+ 'unknown'
71
+ end
72
else
- false
73
+ vprint_error("#{peer} - no response when connecting to #{rmodule}")
74
75
end
76
+
77
78
79
def rsync_list
0 commit comments