[python-win32] Help required with 407 error authentication using defaultcredentials
David Bernal Michelena
poseidon-mares at hotmail.com
Wed Dec 30 18:02:54 EST 2015
Hello,
I need to be able to have python authenticate with the proxy in an enterprise environment using the credentials of the currently logged on user (NTLM). Since we are using an in house developed application, the program must run on several endpoint computers so it should not require to receive any password. Can anyone please share how to do it?
I have done a small program in powershell that is able to demostrate what I need, this program will automatically identify the proxy and if configured will use the defaultcredentials from the current session to authenticate, download the url and print the result.$url="https://weather.yahoo.com/"$proxy = [System.Net.WebRequest]::GetSystemWebProxy()$proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials$wc = new-object system.net.webclient$wc.proxy = $proxy$wc.downloadString($url)
Thanks in advance. David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20151230/6b080e54/attachment.html>
More information about the python-win32
mailing list