Skip to content

Commit b15c38f

Browse files
David MaloneyDavid Maloney
authored andcommitted
Fix output to display ip:port
1 parent fb7af53 commit b15c38f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

modules/auxiliary/scanner/winrm/winrm_auth_methods.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ def run_host(ip)
5252
:name => 'winrm',
5353
:info => desc
5454
)
55-
print_good "Negotiate protocol supported" if methods.include? "Negotiate"
56-
print_good "Kerberos protocol supported" if methods.include? "Kerberos"
57-
print_good "Basic protocol supported" if methods.include? "Basic"
55+
print_good "#{ip}:#{rport}: Negotiate protocol supported" if methods.include? "Negotiate"
56+
print_good "#{ip}:#{rport}: Kerberos protocol supported" if methods.include? "Kerberos"
57+
print_good "#{ip}:#{rport}: Basic protocol supported" if methods.include? "Basic"
5858
else
5959
print_error "#{ip}:#{rport} Does not appear to be a WinRM server"
6060
end

modules/auxiliary/scanner/winrm/winrm_login.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def run_host(ip)
4949
each_user_pass do |user, pass|
5050
resp,c = send_request_ntlm(test_request)
5151
if resp.nil?
52-
print_error "Got no reply from the server, connection may have timed out"
52+
print_error "#{ip}:#{rport}: Got no reply from the server, connection may have timed out"
5353
return
5454
elsif resp.code == 200
5555
cred_hash = {
@@ -62,9 +62,9 @@ def run_host(ip)
6262
:active => true
6363
}
6464
report_auth_info(cred_hash)
65-
print_good "Valid credential found: #{user}:#{pass}"
65+
print_good "#{ip}:#{rport}: Valid credential found: #{user}:#{pass}"
6666
elsif resp.code == 401
67-
print_error "Login failed: #{user}:#{pass}"
67+
print_error "#{ip}:#{rport}: Login failed: #{user}:#{pass}"
6868
else
6969
print_error "Recieved unexpected Response Code: #{resp.code}"
7070
end

0 commit comments

Comments
 (0)