From 6dd40ec0631b41b034804d4fedad59a1811cf85b Mon Sep 17 00:00:00 2001 From: Jon Hart Date: Mon, 12 Oct 2015 10:56:21 -0700 Subject: [PATCH] Better reporting --- .../auxiliary/scanner/rsync/modules_list.rb | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/modules/auxiliary/scanner/rsync/modules_list.rb b/modules/auxiliary/scanner/rsync/modules_list.rb index 1b38b83ff5..5eb07628e4 100644 --- a/modules/auxiliary/scanner/rsync/modules_list.rb +++ b/modules/auxiliary/scanner/rsync/modules_list.rb @@ -29,22 +29,21 @@ class Metasploit3 < Msf::Auxiliary def run_host(ip) connect - version = sock.get_once + return unless greeting = sock.get_once - return if version.blank? - version.strip! + greeting.strip! + return unless /^@RSYNCD: (?\d+(\.\d+)?)$/ =~ greeting - report_service(host: ip, port: rport, proto: 'tcp', name: 'rsync') - report_note( + report_service( host: ip, - proto: 'tcp', port: rport, - type: 'rsync_version', - data: version + proto: 'tcp', + name: 'rsync', + info: "rsync protocol version #{version}" ) # making sure we match the version of the server - sock.puts("#{version}\n") + sock.puts("#{greeting}\n") # the listing command sock.puts("#list\n") listing = sock.get(20) @@ -79,7 +78,7 @@ class Metasploit3 < Msf::Auxiliary host: ip, proto: 'tcp', port: rport, - type: 'rsync_listing', + type: 'rsync_modules', :data => { :modules => listing_table.rows }, :update => :unique_data )