Browse Source

Merge pull request #405 from JakubOnderka/patch-2

fix: [circl_passivedns] Return not found error
pull/407/head
Alexandre Dulaunoy 2 years ago
committed by GitHub
parent
commit
4dae11eb0f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      misp_modules/modules/expansion/circl_passivedns.py
  2. 5
      misp_modules/modules/expansion/circl_passivessl.py

5
misp_modules/modules/expansion/circl_passivedns.py

@ -30,6 +30,11 @@ class PassiveDNSParser():
except Exception:
self.result = {'error': 'There is an authentication error, please make sure you supply correct credentials.'}
return
if not results:
self.result = {'error': 'Not found'}
return
mapping = {'count': 'counter', 'origin': 'text',
'time_first': 'datetime', 'rrtype': 'text',
'rrname': 'text', 'rdata': 'text',

5
misp_modules/modules/expansion/circl_passivessl.py

@ -37,6 +37,11 @@ class PassiveSSLParser():
except Exception:
self.result = {'error': 'There is an authentication error, please make sure you supply correct credentials.'}
return
if not results:
self.result = {'error': 'Not found'}
return
for ip_address, certificates in results.items():
ip_uuid = self._handle_ip_attribute(ip_address)
for certificate in certificates['certificates']:

Loading…
Cancel
Save