Skip to content

Instantly share code, notes, and snippets.

@reanimat0r
Forked from fransr/customcsrf.py
Created November 30, 2021 11:05
Show Gist options
  • Save reanimat0r/e6b6f4a21f53afa676a8e5e628129085 to your computer and use it in GitHub Desktop.
Save reanimat0r/e6b6f4a21f53afa676a8e5e628129085 to your computer and use it in GitHub Desktop.
Hackvertor Custom CSRF tag
import httplib
import urllib
http = httplib.HTTPSConnection('example.com', 443)
cookie = 'your=cookies';
http.request("GET", "/api/v1/csrf", "", {
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36',
'referer': 'https://example.com/',
'cookie': cookie
})
content = http.getresponse()
data = content.getheader('x-csrf-token')
output = str(data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment