Python script, proxy and Microsoft Forefront - automatic authentication

Today I am dealing with a Python3 script that should execute an http mail request and send mail.

The Python script runs on a Windows PC located on a corporate network protected by Forefront. A user logs in with their secret credentials and can access the Internet through a proxy.

Like other applications other than Microsoft (i.e. Chrome), I want my script to connect to the Internet without asking for a user for his username and password.

How can i do this?

+8
python windows proxy ldap
source share
1 answer

Microsoft operating systems use Kerberos authentication, so you cannot directly use your ID + password.

I am on Linux, so I cannot test it directly, but I think you can create a proxy server with fiddler, which can deny authentication for you, and you can use this proxy with python.

Fiddler Composer will automatically answer authentication calls (including the Negotiate protocol that wraps Kerberos) if you check the Authentication checkbox on the Options tab of the menu.

+1
source share

All Articles