Skip to content

Instantly share code, notes, and snippets.

@inian
Created June 9, 2015 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save inian/a294fd769215459fa798 to your computer and use it in GitHub Desktop.
Save inian/a294fd769215459fa798 to your computer and use it in GitHub Desktop.
Mitmproxy cookie Inject Script
cookieFile = ""
def start(context, argv):
global cookieFile
cookieFile = argv[1]
def request(context, flow):
f = open(cookieFile)
cookie =f.read().strip()
f.close()
if cookie != "":
flow.request.headers["Cookie"] = [cookie]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment