简体   繁体   English

如何通过fiddler2捕获python SSL(HTTPS)连接

[英]How to capture python SSL(HTTPS) connection through fiddler2

I'm trying to capture python SSL(HTTPS) connections through Fiddler2 local proxy. 我正在尝试通过Fiddler2本地代理捕获python SSL(HTTPS)连接。 But I only got an error. 但我只有一个错误。

code

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")

The error 错误

requests.exceptions.SSLError: [Errno 1] _ssl.c:510: error:14090086:SSL routines:
SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

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. 我已经在Windows 7系统上接受了“FiddlerRoot.cer”,但没有任何改变。

  • Python 2.7 Python 2.7
  • Windows 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")

I've got to change .cer(DER format) file into .pem(PEM format). 我必须将.cer(DER格式)文件更改为.pem(PEM格式)。 And I realized cert parameter was not that I wanted to use. 我意识到证书参数不是我想要使用的。 The code above is a solution for me. 上面的代码对我来说是一个解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM