我正试图通过burp路由某些请求。这些将是HTTPS请求
我已经正确地安装了burp,并将
cacert.der
证书放在了代码所在的当前工作目录中。我已经看了
https://curl.haxx.se/libcurl/c/curl_easy_setopt.html
,但不能让它工作。
这是我目前用来尝试的代码
@classmethod
def CURLpageThroughBurp(cls, encodedURL):
buffer = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, str(encodedURL))
c.setopt(c.CAINFO, certifi.where())
c.setopt(c.PROXY, '127.0.0.1')
c.setopt(c.PROXYPORT, 8080)
c.setopt(c.PROXY_SSLCERT, "cacert.der")
c.setopt(c.PROXY_SSLCERTTYPE, "DER")
c.setopt(c.FOLLOWLOCATION, True)
##c.setopt(c.PROXYTYPE, c.PROXYTYPE_SOCKS5_HOSTNAME)
c.setopt(c.WRITEDATA, buffer)
c.perform()
c.close()
webpage = buffer.getvalue()
return webpage
Here's the error I receive:
File "randomcode,py", line 111 c.perform()
pycurl.error: (60, 'SSL certificate problem: self signed certificate in certificate chain')