CIRCL Passive DNS output attributes updated

pull/7/head
Alexandre Dulaunoy 2016-03-25 11:30:37 +01:00
parent fe19f2b1af
commit bb558c5a39
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ import json
import pypdns
misperrors = {'error' : 'Error'}
mispattributes = {'input': ['hostname', 'domain','ip-src','ip-dst'], 'output': ['text']}
mispattributes = {'input': ['hostname', 'domain','ip-src','ip-dst'], 'output': ['ip-src', 'ip-dst', 'hostname', 'domain']}
moduleinfo = {'version': '0.1', 'author': 'Alexandre Dulaunoy', 'description': 'Module to access CIRCL Passive DNS', 'module-type': ['expansion','hover']}
moduleconfig = ['username', 'password']
@ -30,9 +30,9 @@ def handler(q=False):
x = pypdns.PyPDNS(basic_auth=(request['config']['username'], request['config']['password']))
res = x.query(toquery)
out = ''
out = []
for v in res:
out = out + "{} ".format(v['rdata'])
out.append("{} ".format(v['rdata']))
r = {'results': [{'types': mispattributes['output'], 'values': out }]}
return r