mirror of https://github.com/MISP/misp-modules
fix: Added hostname attribute support as it is intended
parent
07a4faf67a
commit
1b44668094
|
@ -29,12 +29,12 @@ def handler(q=False):
|
|||
if q is False:
|
||||
return False
|
||||
request = json.loads(q)
|
||||
domain = request["domain"]
|
||||
domain = request["domain"] if "domain" in request else request["hostname"]
|
||||
|
||||
# Get the extension
|
||||
ext = domain.split(".")[-1]
|
||||
|
||||
# Check if if's a common, non country one
|
||||
# Check if it's a common, non country one
|
||||
if ext in common_tlds.keys():
|
||||
val = common_tlds[ext]
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue