Skip to content

Commit 9f0982e

Browse files
committed
rexec_login: Drop repeated prefix
1 parent e76f3bf commit 9f0982e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

modules/auxiliary/scanner/rservices/rexec_login.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def initialize
3838
end
3939

4040
def run_host(ip)
41-
print_status("#{ip}:#{rport} - Starting rexec sweep")
41+
print_status("Starting rexec sweep")
4242

4343
if datastore['ENABLE_STDERR']
4444
# Bind a local port for the target(s) to connect back to for stderr
@@ -47,7 +47,7 @@ def run_host(ip)
4747

4848
sd, stderr_port = ret
4949
else
50-
vprint_status("Skipping stderr")
50+
vprint_status("Skipping stderr call back")
5151
sd = stderr_port = nil
5252
end
5353

@@ -62,7 +62,7 @@ def run_host(ip)
6262
end
6363

6464
def do_login(user, pass, sfd, stderr_port)
65-
vprint_status("#{target_host}:#{rport} - Attempting rexec with #{user}:#{pass}")
65+
vprint_status("Attempting rexec with #{user}:#{pass}")
6666

6767
cmd = datastore['CMD']
6868
cmd ||= 'sh -i 2>&1'
@@ -108,7 +108,7 @@ def do_login(user, pass, sfd, stderr_port)
108108
vprint_error("Result: #{buf.gsub(/[[:space:]]+/, ' ')}") unless buf.empty?
109109
# "Where are you" happens with rexecd in netkit-rsh v0.17
110110
if buf.include?('Where are you?')
111-
print_error("#{target_host}:#{rport} - The rexecd service could not resolve a hostname for #{Rex::Socket.source_address(target_host)}. Ensure a reverse DNS (PTR) record exists for your attacking host.")
111+
print_error("The rexecd service could not resolve a hostname for #{Rex::Socket.source_address(target_host)}. Ensure a reverse DNS (PTR) record exists for your attacking host.")
112112
# Stop, isn't any point going forwards
113113
return :abort
114114
end
@@ -117,7 +117,7 @@ def do_login(user, pass, sfd, stderr_port)
117117
end
118118

119119
# Should we report a vuln here? rexec allowed w/o password?!
120-
print_good("#{target_host}:#{rport}, rexec #{user}:#{pass}")
120+
print_good("rexec successful login: #{user}:#{pass}")
121121
start_rexec_session(service_data[:address], service_data[:port], user, pass, stderr_sock, service_data)
122122

123123
return :next_user

0 commit comments

Comments
 (0)