如何通过fiddler2捕获python SSL(HTTPS)连接 [英] How to capture python SSL(HTTPS) connection through fiddler2
本文介绍了如何通过fiddler2捕获python SSL(HTTPS)连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试通过Fiddler2本地代理捕获python SSL(HTTPS)连接。
但我只收到错误。
I'm trying to capture python SSL(HTTPS) connections through Fiddler2 local proxy. But I only got an error.
代码
import requests
requests.get("https://www.python.org", proxies={"http": "http://127.0.0.1:8888", "https":"http:127.0.0.1:8888"},cert=r"FiddlerRoot.cer")
错误
requests.exceptions.SSLError: [Errno 1] _ssl.c:510: error:14090086:SSL routines:
SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
有谁可以告诉我如何修复错误除了使验证错误?
我已经在Windows 7系统上接受FiddlerRoot.cer,但没有任何改变。
Could anybody tell me how to fix the error except making verify False? I've already accept "FiddlerRoot.cer" on Windows 7 system, but nothing changed.
- Python 2.7
- Windows 7
推荐答案
requests.get("https://www.python.org", proxies={"http": "http://127.0.0.1:8888", "https":"http:127.0.0.1:8888"},verify=r"FiddlerRoot.pem")
我必须改变.cer(DER)格式)文件到.pem(PEM格式)。我意识到证书参数不是我想要使用的。上面的代码对我来说是一个解决方案。
I've got to change .cer(DER format) file into .pem(PEM format). And I realized cert parameter was not that I wanted to use. The code above is a solution for me.
这篇关于如何通过fiddler2捕获python SSL(HTTPS)连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文