JSON decoding of DNS at the probe level doesn't include the Class

This commit is contained in:
Alexandre Dulaunoy 2017-04-20 21:40:00 +02:00
parent 9302ce2306
commit 04497ab6b3

View file

@ -43,7 +43,14 @@ def on_result_response(*args ):
if 'result' in args[0]:
result = args[0]['result']
if 'answers' in result:
process_answers(data=result['answers'])
#process_answers(data=result['answers'])
res = DnsResult.get(args[0],parse_buf=True)
if res.is_error:
return True
if (res.responses[0].abuf.answers):
for answer in res.responses[0].abuf.answers:
process_answers(data=answer['raw_data'], sagan=True)
# print (result['answers'])
else:
# Some of the records are not automatically decoded and need to pass