Skip to content

Instantly share code, notes, and snippets.

@Nishan8583
Last active January 5, 2019 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nishan8583/4868a6d9bdf291293b8dbc18cf6b07de to your computer and use it in GitHub Desktop.
Save Nishan8583/4868a6d9bdf291293b8dbc18cf6b07de to your computer and use it in GitHub Desktop.
import requests,json
from pprint import pprint
def cymon_query(query,type):
api_key = "<You API Key here>"
if type == "ip":
url = "https://cymon.io/api/nexus/v1/ip/{}/events".format(query)
elif type == "domain":
url = "https://cymon.io/api/nexus/v1/domain/{}".format(query)
headers = {"authorization": "Token {}".format(api_key)}
response = requests.get(url,headers=headers)
res = json.loads(response.text)
return res
cymon_query("www.google.com","Domain")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment