Fixes issues based on feedback
This commit addresses comments made by @jvazquez-r7.bug/bundler_fix
parent
af40e9597f
commit
4b4804538f
|
@ -247,25 +247,26 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
'uri' => "/#{url}",
|
'uri' => "/#{url}",
|
||||||
'method' => 'GET',
|
'method' => 'GET',
|
||||||
'headers' => {"Authorization" => "NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAGAbEdAAAADw=="}
|
'headers' => {"Authorization" => "NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAGAbEdAAAADw=="}
|
||||||
}, 25)
|
})
|
||||||
|
|
||||||
if not res
|
if not res
|
||||||
print_error("#{msg} HTTP Connection Error, Aborting")
|
print_error("#{msg} HTTP Connection Error, Aborting")
|
||||||
return :abort
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
if res and res.code == 401 and res['WWW-Authenticate'].match(/^NTLM/i)
|
if res and res.code == 401 and res['WWW-Authenticate'].match(/^NTLM/i)
|
||||||
hash = res['WWW-Authenticate'].split('NTLM ')[1]
|
hash = res['WWW-Authenticate'].split('NTLM ')[1]
|
||||||
domain = Rex::Proto::NTLM::Message.parse(Rex::Text.decode_base64(hash))[:target_name].value().gsub(/\0/,'')
|
domain = Rex::Proto::NTLM::Message.parse(Rex::Text.decode_base64(hash))[:target_name].value().gsub(/\0/,'')
|
||||||
print_good("Found target domain: " + domain)
|
print_good("Found target domain: " + domain)
|
||||||
break
|
return domain
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, Errno::ETIMEDOUT
|
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, Errno::ETIMEDOUT
|
||||||
print_error("#{msg} HTTP Connection Failed, Aborting")
|
print_error("#{msg} HTTP Connection Failed, Aborting")
|
||||||
return :abort
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
return domain
|
return domain
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue