Browse Source

Changed the output format to include all matching attribute types

- changed the output format to give us a bit more flexibility
  - return an array of results
  - return the valid misp attribute types for each result
alternate_response
Iglocska 6 years ago
parent
commit
5082a835d8
  1. 7
      modules/expansion/dns.py

7
modules/expansion/dns.py

@ -1,7 +1,7 @@
import json
import dns.resolver
mispattributes = ['hostname', 'domain']
mispattributes = {'input':['hostname', 'domain'], 'output':['ip-src', 'ip-dst']}
def handler(q=False):
if q is False:
@ -21,10 +21,9 @@ def handler(q=False):
return False
except dns.exception.Timeout:
return False
r = {}
r["ip-dst"] = str(answer[0])
r = {'results':[{'types':mispattributes['output'], 'values':[str(answer[0])]}]}
return r
def introspection():
return mispattributes
return mispattributes['input']

Loading…
Cancel
Save