I’m trying to understand how mitmproxy works, Does mitmproxy stores the values decoded from the packets (for ex, payload data) in to the memory? If yes, where can I get those, in which file I can found its code? Can I redirect it to a file on the local machine? Thank you.
I’m not sure what exactly you are looking for, but we are not operating on a packet-basis. Mitmproxy just opens a regular TCP listening socket to accept connections, and of course also opens new TCP connections to talk to servers.