Add NTLM proxy authentication to urllib2

Jarek Zgoda jzgoda at
Tue Sep 5 21:16:37 CEST 2006

looping napisał(a):

> I have to make internet connections through an ISA proxy server that
> use NTLM or Kerberos authorization method.
> I've found a program in python called ntlmaps that act like a proxy and
> could make the NTLM authentication, but you have to run it and make all
> your connection through it, not an optimal solution.
> So what I really need is an enhanced urllib2 that support NTLM or
> Kerberos.
> I've found that pywin32 could manage NTLM encryption with the sspi
> module but I've no idea how to implement it in urllib2, NTLM
> authentication use a 'Token dance' between client and server.
> Anyone has an experience, a demo or an idea to share ?

Look at NTLM APS (, Dimitry did this
already (although not in urllib).

Jarek Zgoda

More information about the Python-list mailing list