mirror of https://github.com/CIRCL/lookyloo
fix: Avoid exception when there is no URL to send to VT
parent
db9ca0ea2b
commit
a6fff6687d
|
@ -1098,6 +1098,8 @@ class Lookyloo():
|
|||
|
||||
def __misp_add_vt_to_URLObject(self, obj: MISPObject) -> Optional[MISPObject]:
|
||||
urls = obj.get_attributes_by_relation('url')
|
||||
if not urls:
|
||||
return None
|
||||
url = urls[0]
|
||||
self.vt.url_lookup(url.value)
|
||||
report = self.vt.get_url_lookup(url.value)
|
||||
|
|
Loading…
Reference in New Issue