在脚本头部写

1
2
3
4
5
6
7
8
proxies = {
"http": 'http://127.0.0.1:8080',
"https": 'http://127.0.0.1:8080'
}
requests_request = partial(requests.request, proxies=proxies, verify=False, allow_redirects=False)
url="https://www.baidu.com"
headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0'}
respnse = requests_request('GET',url,headers=headers)

设置就是上面这么设置,具体链接端口看自己的burpsuit设置,注意如果访问的网站是https网站,那么https的代理应该改成http代理,并且verify=False不验证证书,否则代理不成功

image-20240612200821944