mirror of https://github.com/MISP/misp-modules
Merge pull request #405 from JakubOnderka/patch-2
fix: [circl_passivedns] Return not found errorpull/407/head
commit
4dae11eb0f
|
@ -30,6 +30,11 @@ class PassiveDNSParser():
|
||||||
except Exception:
|
except Exception:
|
||||||
self.result = {'error': 'There is an authentication error, please make sure you supply correct credentials.'}
|
self.result = {'error': 'There is an authentication error, please make sure you supply correct credentials.'}
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if not results:
|
||||||
|
self.result = {'error': 'Not found'}
|
||||||
|
return
|
||||||
|
|
||||||
mapping = {'count': 'counter', 'origin': 'text',
|
mapping = {'count': 'counter', 'origin': 'text',
|
||||||
'time_first': 'datetime', 'rrtype': 'text',
|
'time_first': 'datetime', 'rrtype': 'text',
|
||||||
'rrname': 'text', 'rdata': 'text',
|
'rrname': 'text', 'rdata': 'text',
|
||||||
|
|
|
@ -37,6 +37,11 @@ class PassiveSSLParser():
|
||||||
except Exception:
|
except Exception:
|
||||||
self.result = {'error': 'There is an authentication error, please make sure you supply correct credentials.'}
|
self.result = {'error': 'There is an authentication error, please make sure you supply correct credentials.'}
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if not results:
|
||||||
|
self.result = {'error': 'Not found'}
|
||||||
|
return
|
||||||
|
|
||||||
for ip_address, certificates in results.items():
|
for ip_address, certificates in results.items():
|
||||||
ip_uuid = self._handle_ip_attribute(ip_address)
|
ip_uuid = self._handle_ip_attribute(ip_address)
|
||||||
for certificate in certificates['certificates']:
|
for certificate in certificates['certificates']:
|
||||||
|
|
Loading…
Reference in New Issue