README and minor felicities for script examples.
This commit is contained in:
parent
b635112d36
commit
7629a43d82
|
@ -1,5 +1,6 @@
|
|||
|
||||
add_header.py Simple script that just adds a header to every request.
|
||||
stub.py Script stub with a method definition for every event.
|
||||
stickycookies An example of writing a custom proxy with libmproxy
|
||||
add_header.py Simple script that just adds a header to every request.
|
||||
flowbasic Basic use of mitmproxy as a library.
|
||||
stub.py Script stub with a method definition for every event.
|
||||
stickycookies An example of writing a custom proxy with libmproxy.
|
||||
upsidedownternet.py Rewrites traffic to turn PNGs upside down.
|
||||
|
||||
|
|
|
@ -2,8 +2,7 @@ import Image, cStringIO
|
|||
def response(context, flow):
|
||||
if flow.response.headers["content-type"] == ["image/png"]:
|
||||
s = cStringIO.StringIO(flow.response.content)
|
||||
img = Image.open(s)
|
||||
img = img.rotate(180)
|
||||
img = Image.open(s).rotate(180)
|
||||
s2 = cStringIO.StringIO()
|
||||
img.save(s2, "png")
|
||||
flow.response.content = s2.getvalue()
|
||||
|
|
Loading…
Reference in New Issue