Skip to content

Instantly share code, notes, and snippets.

@securitytube
Created January 21, 2015 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save securitytube/d150078689d7240169f1 to your computer and use it in GitHub Desktop.
Save securitytube/d150078689d7240169f1 to your computer and use it in GitHub Desktop.
Pentester Academy CSRF Challenge
param = self.request.get("ch9")
referer = self.request.referer
if referer:
domain = referer.replace('http://', '').split('/')[0]
logging.info(domain)
if param == flag and ( domain.find("pentesteracademylab.appspot.com") != -1 ) :
cid = "success"
self.response.headers.add_header("Set-Cookie", "cid-csrf9="+cid)
self.redirect("/lab/webapp/csrf/9")
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment