Created
February 16, 2021 08:30
-
-
Save fransr/34a17f59c71d4d525c41284766a48ebe to your computer and use it in GitHub Desktop.
Hackvertor Custom CSRF tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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