mirror of https://github.com/MISP/misp-modules
fix: Making pep8 happy
parent
ae9e6d0a25
commit
5f90ae776f
|
@ -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…
Reference in New Issue