Landing #1744 - Checks nil before using resp.headers['Server']

[Closes #1744]
unstable
sinn3r 2013-04-19 10:37:05 -05:00
commit 7fdf84ac45
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class Metasploit3 < Msf::Auxiliary
def run_host(ip)
resp = winrm_poke
return nil if resp.nil?
if resp.code == 401 and resp.headers['Server'].include? "Microsoft-HTTPAPI"
if resp.code == 401 and resp.headers['Server'] and resp.headers['Server'].include? "Microsoft-HTTPAPI"
methods = parse_auth_methods(resp)
desc = resp.headers['Server'] + " Authentication Methods: " + methods.to_s
report_service(