From 0ae2e64bc56dd8543a97cc4ebc94de4738376488 Mon Sep 17 00:00:00 2001 From: Jon Hart Date: Thu, 5 Nov 2015 09:20:02 -0800 Subject: [PATCH] Only mark rsync as req'ing auth true/false if we are sure, otherwise vprint and unknown --- modules/auxiliary/scanner/rsync/modules_list.rb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/auxiliary/scanner/rsync/modules_list.rb b/modules/auxiliary/scanner/rsync/modules_list.rb index b894890c3f..4bc9536a41 100644 --- a/modules/auxiliary/scanner/rsync/modules_list.rb +++ b/modules/auxiliary/scanner/rsync/modules_list.rb @@ -60,11 +60,20 @@ class Metasploit3 < Msf::Auxiliary def rsync_requires_auth?(rmodule) sock.puts("#{rmodule}\n") res = sock.get_once(-1, read_timeout) - if res && (res =~ /^#{RSYNC_HEADER} AUTHREQD/) - true + if res + if res =~ /^#{RSYNC_HEADER} AUTHREQD/ + true + elsif res =~ /^#{RSYNC_HEADER} OK/ + false + else + vprint_error("#{peer} - unexpected response when connecting to #{rmodule}: #{res}") + 'unknown' + end else - false + vprint_error("#{peer} - no response when connecting to #{rmodule}") + 'unknown' end + end def rsync_list