Created
June 21, 2021 09:33
-
-
Save ritchie46/2506392af3b71959420692923ffa289e to your computer and use it in GitHub Desktop.
use CEMS API without client library
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
# $ pip install requests | |
import requests | |
username = "my-username" | |
password = "my-little-secret" | |
r = requests.post( | |
"https://crux-nuclei.com/login", | |
json={"username": username, "password": password}, | |
) | |
ACCESS_TOKEN = r.json()["access_token"] | |
# use access token | |
r = requests.get( | |
"https://crux-nuclei.com/api/gef-model/url-behind-auth", | |
headers={"Authorization": f"Bearer {ACCESS_TOKEN}"}, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment