From 601380df68bf7407db3d2f4ce06ec1debfaff720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 11 Apr 2016 11:07:11 +0200 Subject: [PATCH] Make PEP8 happy --- modules/expansion/circl_passivedns.py | 8 ++++---- modules/expansion/cve.py | 2 +- modules/expansion/dns.py | 4 ++-- modules/expansion/passivetotal.py | 1 - modules/expansion/sourcecache.py | 1 + 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/expansion/circl_passivedns.py b/modules/expansion/circl_passivedns.py index 3b486f8..3da5bac 100755 --- a/modules/expansion/circl_passivedns.py +++ b/modules/expansion/circl_passivedns.py @@ -1,9 +1,9 @@ import json import pypdns -misperrors = {'error' : 'Error'} -mispattributes = {'input': ['hostname', 'domain','ip-src','ip-dst'], 'output': ['freetext']} -moduleinfo = {'version': '0.1', 'author': 'Alexandre Dulaunoy', 'description': 'Module to access CIRCL Passive DNS', 'module-type': ['expansion','hover']} +misperrors = {'error': 'Error'} +mispattributes = {'input': ['hostname', 'domain', 'ip-src', 'ip-dst'], 'output': ['freetext']} +moduleinfo = {'version': '0.1', 'author': 'Alexandre Dulaunoy', 'description': 'Module to access CIRCL Passive DNS', 'module-type': ['expansion', 'hover']} moduleconfig = ['username', 'password'] @@ -34,7 +34,7 @@ def handler(q=False): for v in res: out = out + "{} ".format(v['rdata']) - r = {'results': [{'types': mispattributes['output'], 'values': out }]} + r = {'results': [{'types': mispattributes['output'], 'values': out}]} return r diff --git a/modules/expansion/cve.py b/modules/expansion/cve.py index af2eaa0..48e8f02 100755 --- a/modules/expansion/cve.py +++ b/modules/expansion/cve.py @@ -17,7 +17,7 @@ def handler(q=False): misperrors['error'] = 'Vulnerability id missing' return misperrors - r = requests.get(cveapi_url+request.get('vulnerability')) + r = requests.get(cveapi_url + request.get('vulnerability')) if r.status_code == 200: vulnerability = json.loads(r.text) if vulnerability.get('summary'): diff --git a/modules/expansion/dns.py b/modules/expansion/dns.py index 3f37c3f..8e23731 100755 --- a/modules/expansion/dns.py +++ b/modules/expansion/dns.py @@ -1,9 +1,9 @@ import json import dns.resolver -misperrors = {'error' : 'Error'} +misperrors = {'error': 'Error'} mispattributes = {'input': ['hostname', 'domain'], 'output': ['ip-src', 'ip-dst']} -moduleinfo = {'version': '0.1', 'author': 'Alexandre Dulaunoy', 'description': 'Simple DNS expansion service to resolve IP address from MISP attributes', 'module-type': ['expansion','hover']} +moduleinfo = {'version': '0.1', 'author': 'Alexandre Dulaunoy', 'description': 'Simple DNS expansion service to resolve IP address from MISP attributes', 'module-type': ['expansion', 'hover']} def handler(q=False): diff --git a/modules/expansion/passivetotal.py b/modules/expansion/passivetotal.py index 8b38265..5325d19 100755 --- a/modules/expansion/passivetotal.py +++ b/modules/expansion/passivetotal.py @@ -344,4 +344,3 @@ def introspection(): def version(): moduleinfo['config'] = moduleconfig return moduleinfo - diff --git a/modules/expansion/sourcecache.py b/modules/expansion/sourcecache.py index 6f9c39c..b09068b 100755 --- a/modules/expansion/sourcecache.py +++ b/modules/expansion/sourcecache.py @@ -35,6 +35,7 @@ def __archiveLink(archive_path, tocache): archiver = url_archiver.Archive(archive_path=archive_path) return archiver.fetch(url=tocache, armor=True) + def introspection(): return mispattributes