Python Web Request via Burp or other Proxy Servers
It's no surprise that even if you are automating your web requests for pentesting, sometimes it's easier to debug sending through the Burp Proxy so that you can add to the repeater. Other times, you may just want or need to use a proxy for the purpose. The python snippet below is an example of using proxy for your web request to capture the request so you can repeat with repeater :)
import requests, sys
proxies = {
"http" : "http://127.0.0.1:8080",
"https" : "https://127.0.0.1:8080",
}
target = "http://%s" % sys.argv[1]
json = YOUR_JSON_DATA
r = requests.post(target, json, proxies=proxies)
print r.content