Skip to content

Instantly share code, notes, and snippets.

@cincodenada
Forked from mhils/save_body.py
Last active February 27, 2016 15:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cincodenada/c7f22bf1baefa5cede30 to your computer and use it in GitHub Desktop.
Save cincodenada/c7f22bf1baefa5cede30 to your computer and use it in GitHub Desktop.
Update for new API
from libmproxy.model import decoded
def response(context, flow):
with decoded(flow.response): # automatically decode gzipped responses.
with open("body.txt","ab") as f:
f.write(flow.response.content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment