During the exploit writing we will be mostly using the pythonrequests library.
Documentation:
Useful libraries
import requests
Requests most common commands
Sending the requests
requests.delete(url, args) // Sends a DELETE request to the specified url
requests.get(url, params, args) // Sends a GET request to the specified url
requests.head(url, args) // Sends a HEAD request to the specified url
requests.patch(url, data, args) // Sends a PATCH request to the specified url
requests.post(url, data, json, args) // Sends a POST request to the specified url
requests.put(url, data, args) // Sends a PUT request to the specified url
Reading the data
Verify = false is used for disabling the SSL/TLS check
// Storing the response
r = requests.get("https://www.google.com/", verify=False)
// Interesting parameters which we get in HTTP response object
r.status_code
r.headers
r.cookies
r.text
Proxy traffic through Burp Suite
If you want to see and analyze the request from exploit you can forward it to Burp Suite by adding proxy to requests in the following way: