Skip to content

Commit

Permalink
try ceye.io
Browse files Browse the repository at this point in the history
  • Loading branch information
zhzyker committed Feb 2, 2021
1 parent 4963ff1 commit a3a9d7f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions module/api/ceye.py
Expand Up @@ -13,7 +13,10 @@ def ceye():
ceye_token = globals.get_value("ceye_token")
ceye_token = globals.get_value("ceye_token")
api_url = "http://api.ceye.io/v1/records?type=dns&token=" + ceye_token
res = requests.get(api_url, headers=headers, timeout=timeout, verify=False)
if res.status_code != 200:
print(now.timed(de=0) + color.red_warn() + color.red(" Ceye.io: " + res.text))
return res.text
try:
res = requests.get(api_url, headers=headers, timeout=timeout, verify=False)
if res.status_code != 200:
print(now.timed(de=0) + color.red_warn() + color.red(" Ceye.io: " + res.text))
return res.text
except Exception:
return "Ceye.io connection failed"

0 comments on commit a3a9d7f

Please sign in to comment.