fix: Making pep8 happy

pull/360/head
chrisr3d 3 years ago
parent ae9e6d0a25
commit 5f90ae776f
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
  1. 2
      misp_modules/modules/expansion/circl_passivedns.py
  2. 4
      misp_modules/modules/expansion/circl_passivessl.py

@ -21,7 +21,7 @@ class PassiveDNSParser():
if hasattr(self, 'result'):
return self.result
event = json.loads(self.misp_event.to_json())
results = {key:event[key] for key in ('Attribute', 'Object')}
results = {key: event[key] for key in ('Attribute', 'Object')}
return {'results': results}
def parse(self, value):

@ -37,8 +37,6 @@ class PassiveSSLParser():
except Exception:
self.result = {'error': 'There is an authentication error, please make sure you supply correct credentials.'}
return
cert_hash = 'x509-fingerprint-sha1'
cert_type = 'pem'
for ip_address, certificates in results.items():
ip_uuid = self._handle_ip_attribute(ip_address)
for certificate in certificates['certificates']:
@ -46,7 +44,7 @@ class PassiveSSLParser():
def _handle_certificate(self, certificate, ip_uuid):
x509 = MISPObject('x509')
x509.add_attribute(self.cert_hash, type=self.cert_hash, value = certificate)
x509.add_attribute(self.cert_hash, type=self.cert_hash, value=certificate)
cert_details = self.pssl.fetch_cert(certificate)
info = cert_details['info']
for feature, mapping in self.mapping.items():

Loading…
Cancel
Save