Skip to content

Commit 1473f2c

Browse files
committed
More consistent printing
1 parent 7101ff2 commit 1473f2c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/auxiliary/scanner/rsync/modules_list.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ def initialize
4545
[
4646
OptBool.new('SHOW_MOTD',
4747
[ true, 'Show the rsync motd, if found', false ]),
48+
OptBool.new('SHOW_VERSION',
49+
[ true, 'Show the rsync version', false ]),
4850
OptInt.new('READ_TIMEOUT', [ true, 'Seconds to wait while reading rsync responses', 2 ])
4951
]
5052
)
@@ -166,6 +168,7 @@ def run_host(ip)
166168
name: 'rsync',
167169
info: info
168170
)
171+
print_status("#{peer} - rsync version: #{version}") if datastore['SHOW_VERSION']
169172
print_status("#{peer} - rsync MOTD: #{motd}") if motd && datastore['SHOW_MOTD']
170173

171174
modules_metadata = {}
@@ -179,10 +182,10 @@ def run_host(ip)
179182
end
180183

181184
if modules_metadata.empty?
182-
print_status("#{peer} - rsync #{version}: no modules found")
185+
print_status("#{peer} - no rsync modules found")
183186
else
184187
modules = modules_metadata.map { |m| m[:name] }
185-
print_good("#{peer} - rsync #{version}: #{modules.size} modules found: #{modules.join(', ')}")
188+
print_good("#{peer} - #{modules.size} rsync modules found: #{modules.join(', ')}")
186189

187190
table_columns = %w(Name Comment)
188191
if datastore['TEST_AUTHENTICATION']

0 commit comments

Comments
 (0)