Skip to content

machevalia/ProxyPythonBurpSuite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

ProxyPythonBurpSuite

How to proxy a python script through Burp Suite

  1. Download the certificate from Burp Suite url
  • Open your web browser and go to http://burpsuite.
  • Click on “CA Certificate” button on the top right corner and save the certificate locally. image
  1. Convert the certificate to PEM encoded format
  • The certificate downloaded is DER formated and needs to be PEM encoded.
  • You need to run the following command: openssl x509 -inform der -in cacert.der -out certificate.pem image
  1. Edit your python code
  • Edit your python code with the following lines just below the import of Requests and OS modules:
import os

proxy = 'http://127.0.0.1:8080'
os.environ['http_proxy'] = proxy
os.environ['HTTP_PROXY'] = proxy
os.environ['https_proxy'] = proxy
os.environ['HTTPS_PROXY'] = proxy
os.environ['REQUESTS_CA_BUNDLE'] = "/path/to/cert/certificate.pem"

image

  1. Save and run!

About

How to proxy a python script through Burp Suite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published