mirror of https://github.com/MISP/misp-modules
commit
494f7762dc
|
@ -1,9 +1,9 @@
|
||||||
import json
|
import json
|
||||||
import pypdns
|
import pypdns
|
||||||
|
|
||||||
misperrors = {'error' : 'Error'}
|
misperrors = {'error': 'Error'}
|
||||||
mispattributes = {'input': ['hostname', 'domain','ip-src','ip-dst'], 'output': ['freetext']}
|
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']}
|
moduleinfo = {'version': '0.1', 'author': 'Alexandre Dulaunoy', 'description': 'Module to access CIRCL Passive DNS', 'module-type': ['expansion', 'hover']}
|
||||||
moduleconfig = ['username', 'password']
|
moduleconfig = ['username', 'password']
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ def handler(q=False):
|
||||||
for v in res:
|
for v in res:
|
||||||
out = out + "{} ".format(v['rdata'])
|
out = out + "{} ".format(v['rdata'])
|
||||||
|
|
||||||
r = {'results': [{'types': mispattributes['output'], 'values': out }]}
|
r = {'results': [{'types': mispattributes['output'], 'values': out}]}
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ def handler(q=False):
|
||||||
misperrors['error'] = 'Vulnerability id missing'
|
misperrors['error'] = 'Vulnerability id missing'
|
||||||
return misperrors
|
return misperrors
|
||||||
|
|
||||||
r = requests.get(cveapi_url+request.get('vulnerability'))
|
r = requests.get(cveapi_url + request.get('vulnerability'))
|
||||||
if r.status_code == 200:
|
if r.status_code == 200:
|
||||||
vulnerability = json.loads(r.text)
|
vulnerability = json.loads(r.text)
|
||||||
if vulnerability.get('summary'):
|
if vulnerability.get('summary'):
|
||||||
|
|
|
@ -344,4 +344,3 @@ def introspection():
|
||||||
def version():
|
def version():
|
||||||
moduleinfo['config'] = moduleconfig
|
moduleinfo['config'] = moduleconfig
|
||||||
return moduleinfo
|
return moduleinfo
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ def __archiveLink(archive_path, tocache):
|
||||||
archiver = url_archiver.Archive(archive_path=archive_path)
|
archiver = url_archiver.Archive(archive_path=archive_path)
|
||||||
return archiver.fetch(url=tocache, armor=True)
|
return archiver.fetch(url=tocache, armor=True)
|
||||||
|
|
||||||
|
|
||||||
def introspection():
|
def introspection():
|
||||||
return mispattributes
|
return mispattributes
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue