File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
modules/auxiliary/scanner/winrm Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ def winrm_poke(timeout = 20)
49
49
'method' => 'POST' ,
50
50
'ctype' => ctype ,
51
51
'data' => opts [ 'data' ]
52
- } ) )
52
+ } ) , to )
53
53
return resp
54
54
end
55
55
Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ def initialize
41
41
42
42
def run_host ( ip )
43
43
resp = winrm_poke
44
- if resp . code == 401 and resp . headers [ 'Server' ] . include? "Microsoft-HTTPAPI"
44
+ return nil if resp . nil?
45
+ if resp . code == 401 and resp . headers [ 'Server' ] . include? "Microsoft-HTTPAPI"
45
46
methods = parse_auth_methods ( resp )
46
47
desc = resp . headers [ 'Server' ] + " Authentication Methods: " + methods . to_s
47
48
report_service (
@@ -53,8 +54,8 @@ def run_host(ip)
53
54
)
54
55
print_good "Negotiate protocol supported" if methods . include? "Negotiate"
55
56
print_good "Kerberos protocol supported" if methods . include? "Kerberos"
56
- print_good "Basic protocol supported" if methods . include? "Basic"
57
- else
57
+ print_good "Basic protocol supported" if methods . include? "Basic"
58
+ else
58
59
print_error "#{ ip } :#{ rport } Does not appear to be a WinRM server"
59
60
end
60
61
end
You can’t perform that action at this time.
0 commit comments