Skip to content

Instantly share code, notes, and snippets.

@ritchie46
Created June 21, 2021 09:33
Show Gist options
  • Save ritchie46/2506392af3b71959420692923ffa289e to your computer and use it in GitHub Desktop.
Save ritchie46/2506392af3b71959420692923ffa289e to your computer and use it in GitHub Desktop.
use CEMS API without client library
# $ 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