3 ms·
> the bytes object returned by mitmproxy's API (`body: bytearray = bytearray(flow.response.get_content(strict=False) or b"")`) is immutable Byte objects are im
by sgarland 2y ago
> the bytes object returned by mitmproxy's API (`body: bytearray = bytearray(flow.response.get_content(strict=False) or b"")`) is immutable
Byte objects are immutable, but bytearray objects are not.
- vitus 2y agoYes, that's my point, although I can see why you interpreted it otherwise. mitmproxy's API is flow.response.get_content(strict=False), which returns a bytes object; the proof-of-concept script then copies it into the bytearray using the code that I've cited.