Is there any decent way to obtain complete byte request and response packets? #7936
AugustineFulgur
started this conversation in
General
Replies: 1 comment 1 reply
-
|
The export addon has relevant functionality: mitmproxy/mitmproxy/addons/export.py Line 218 in 2208605 If you want the exact bytes exactly as-seen on the wire, you need to switch to TCP mode. For example, mitmproxy will reassemble chunked message bodies before storing them in |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm writing a security tool based on mitmproxy. But somehow I found it is so hard to get a hole request or response package which I would like to show in my tool's panel or use to search regex expressions.
When I read original codes I found that we can just add an property such as "raw_package" like :
@property def raw_package(self) -> bytes: return f"{self.method} {self.path} {self.http_version or 'HTTP/1.1'}\r\n".encode("utf-8") \ + self.headers.__bytes__() \ + b"\r\n" \ + self.raw_contentIn mitmproxy.http.Request.
I think may many people who use mitmproxy to make themselves tool's would like to get an property like this.
Wish I wont bother you.Hope your answer soon thx.
If it is possible I will add the code of Response
Beta Was this translation helpful? Give feedback.
All reactions