View Python communication with Fiddler

I wanted to HTTPS decode the communication of the az command and see it in Fiddler, but Python doesn't seem to look in the Windows certificate store, and I couldn't trust Fiddler's root certificate and got a certificate error.

Please ensure you have network connection. Error detail: 
HTTPSConnectionPool(host='login.microsoftonline.com', port=443): Max retries exceeded with url: /common/oauth2/token (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))

solution

Set Fiddler's Root certificate in the environment variable CURL_CA_BUNDLE.

$env:CURL_CA_BUNDLE = "C:\Path\To\FiddlerRoot.cer"

The root certificate must be Base64 encoded. Easy to export in Base64 from the certificate store.

image.png

After that, set the Fiddler proxy in the environment variable

$env:http_proxy = "http://127.0.0.1:8888"
$env:https_proxy = $env:http_proxy

Now you can take a communication trace with Fiddler.

Recommended Posts

View Python communication with Fiddler
Serial communication with Python
Socket communication with Python
Serial communication with python
HTTP communication with Python
Socket communication with Python LEGO Mindstorms
I tried SMTP communication with Python
FizzBuzz with Python3
Scraping with Python
Scraping with Python
Python with Go
Twilio with Python
Integrate with Python
Play with 2016-Python
AES256 with python
Tested with Python
python starts with ()
with syntax (Python)
Bingo with python
Zundokokiyoshi with python
Excel with Python
Microcomputer with Python
Cast with python
Zip, unzip with python
Django 1.11 started with Python3.6
Python with eclipse + PyDev.
Data analysis with python 2
Scraping with Python (preparation)
Try scraping with Python.
Learning Python with ChemTHEATER 03
Sequential search with Python
"Object-oriented" learning with python
Handling yaml with python
Solve AtCoder 167 with python
[Python] Use JSON with Python
Learning Python with ChemTHEATER 05-1
Learn Python with ChemTHEATER
Run prepDE.py with python3
Communication processing by Python
1.1 Getting Started with Python
Collecting tweets with Python
Binarization with OpenCV / Python
3. 3. AI programming with Python
Kernel Method with Python
Scraping with Python + PhantomJS
Drive WebDriver with python
[Python] Redirect with CGIHTTPServer
Voice analysis with python
Think yaml with python
Operate Kinesis with Python
Use DynamoDB with Python
Zundko getter with python
Handle Excel with python
Ohm's Law with Python
Run Blender with python
Python starting with Windows 7
Heatmap with Python + matplotlib
Multi-process asynchronously with python
Python programming with Atom
Learning Python with ChemTHEATER 02
Use Python 3.8 with Anaconda