O'Reilly logo

Learning Python Web Penetration Testing by Christian Martorella

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required