curl-and-python
Help converting curl command to pycurl
Date: Wed, 25 May 2005 15:37:34 -0500
I've got some of this worked out, but am getting "Authorization
Required" now when I try to login:
curl command:
curl -L -F "Upload%20File=testtest" -E D:\MyCert.pem:Password -b cookies
-c cookies https://redxfer.wellsfargo.com
using the following:
c = pycurl.Curl()
c.setopt(pycurl.URL, WellsFargoLoginUrl) #Open connection to website
c.setopt(pycurl.SSL_VERIFYPEER, 0) #Do not attempt to verify
c.setopt(pycurl.SSL_VERIFYHOST, 0) #Do not attempt to verify
c.setopt(pycurl.SSLKEY, WellsFargoCertificate)
c.setopt(pycurl.SSLKEYPASSWD, WellsFargoCertificatePassword)
c.setopt(pycurl.FOLLOWLOCATION, 1)
c.setopt(pycurl.MAXREDIRS, 4)
c.setopt(pycurl.COOKIEFILE, "cookies")
c.setopt(pycurl.WRITEFUNCTION, f1.body_callback) # used to write to a
buffer for later reading/parsing
c.perform()
Contents of f1 gives me a 401 error. I was getting some sort of
authentication as the redirect is definitely taking me to a different
address than the login address. I'm not quite sure what I'm missing or
where to go from here and would really appreciate any help that can be
passed in.
The Certificate is given to us by Wells Fargo. I've converted it into a
PEM file from P12 using SSL. It works just fine in curl.exe.
Thanks for any help/pointers you can give me.
Peter A. Schott
drive financial services
Database Administrator
p: 214.237.3567
c: 214.734.1792
f: 214.237.3495
email: pschott_at_drivefinancial.com <mailto:pschott_at_drivefinancial.com>
___________________________________________________________________________________
This e-mail is covered by the Electronic Communications Privacy Act, 18 U.S.C.
Sections 2510-2521. The information contained in this e-mail is confidential
and intended only for use of the individual or entity named above. If the reader
of this message is not the intended recipient, or the employee or agent
responsible to deliver it to the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this message in error or there are any problems
please notify the originator immediately.
The unauthorized use, disclosure, copying or alteration of this message is
strictly forbidden. This mail and any attachments have been scanned for viruses
prior to leaving the Drive Financial Services network. Drive Financial Services
will not be liable for direct, special, indirect or consequential damages arising
from alteration of the contents of this message by a third party or as a result of
any virus being passed on.
___________________________________________________________________________________
_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-and-python
Received on 2005-05-25