Inline scripts

In the previous section, we defined a simple inline script in order to access the response from a request. Other parts of the communication, the mitmproxy, let us access the response via handlers:

  • start: This is called once the script starts up, before any other events
  • clientconnect : This is called when a client initiates a connection to the proxy
A connection can correspond to multiple HTTP requests.
  • request: This is called when a client request has been received
  • serverconnect : This is called when the proxy initiates a connection to the target server
  • responseheaders: This is called when the responseheaders for a server response have been received, but the response body has not been processed
  • response: This is called when ...

Get Learning Python Web Penetration Testing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.