Created
June 19, 2021 19:24
-
-
Save jeroenhe/451db2a595150310b978e793d3843c43 to your computer and use it in GitHub Desktop.
Acquire _csrf token from html page using python
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
#!/usr/bin/env python3 | |
import re | |
import sys | |
for i in sys.stdin: | |
g = re.match('.*\<.*name="_csrf".*value="(.*)"\>.*', i); | |
if g is not None: | |
print (g.group(1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment