Skip to content

Instantly share code, notes, and snippets.

@Artorios
Forked from inian/cookieinject.py
Created April 16, 2018 12:35
Show Gist options
  • Save Artorios/318388e846f7555c2b2557b740e80a32 to your computer and use it in GitHub Desktop.
Save Artorios/318388e846f7555c2b2557b740e80a32 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