Better reporting

bug/bundler_fix
Jon Hart 2015-10-12 10:56:21 -07:00
parent caf848ddf4
commit 6dd40ec063
1 changed files with 9 additions and 10 deletions

View File

@ -29,22 +29,21 @@ class Metasploit3 < Msf::Auxiliary
def run_host(ip) def run_host(ip)
connect connect
version = sock.get_once return unless greeting = sock.get_once
return if version.blank? greeting.strip!
version.strip! return unless /^@RSYNCD: (?<version>\d+(\.\d+)?)$/ =~ greeting
report_service(host: ip, port: rport, proto: 'tcp', name: 'rsync') report_service(
report_note(
host: ip, host: ip,
proto: 'tcp',
port: rport, port: rport,
type: 'rsync_version', proto: 'tcp',
data: version name: 'rsync',
info: "rsync protocol version #{version}"
) )
# making sure we match the version of the server # making sure we match the version of the server
sock.puts("#{version}\n") sock.puts("#{greeting}\n")
# the listing command # the listing command
sock.puts("#list\n") sock.puts("#list\n")
listing = sock.get(20) listing = sock.get(20)
@ -79,7 +78,7 @@ class Metasploit3 < Msf::Auxiliary
host: ip, host: ip,
proto: 'tcp', proto: 'tcp',
port: rport, port: rport,
type: 'rsync_listing', type: 'rsync_modules',
:data => { :modules => listing_table.rows }, :data => { :modules => listing_table.rows },
:update => :unique_data :update => :unique_data
) )