Search code examples
pythoncurlsmbpycurl

How to use samba with pycurl?


I have the following code:

crl = pycurl.Curl()
crl.setopt(pycurl.USERPWD, 'user:pass')
crl.setopt(pycurl.URL, 'url')
crl.setopt(pycurl.VERBOSE, 1)
crl.perform()

How can I use a similar code to work with SMB protocol?


Solution

  • Take a look here, set CURLOPT_HTTPAUTH option to value CURLAUTH_NTLM. If this doesn't work try pysmb.