diff --git a/secator/tasks/dnsx.py b/secator/tasks/dnsx.py index 3bf3f3e6..4d6a6f13 100644 --- a/secator/tasks/dnsx.py +++ b/secator/tasks/dnsx.py @@ -1,6 +1,6 @@ from secator.decorators import task from secator.definitions import (OPT_PIPE_INPUT, RATE_LIMIT, RETRIES, THREADS) -from secator.output_types import Record +from secator.output_types import Record, Ip from secator.tasks._categories import ReconDns import json @@ -12,7 +12,7 @@ class dnsx(ReconDns): json_flag = '-json' input_flag = OPT_PIPE_INPUT file_flag = OPT_PIPE_INPUT - output_types = [Record] + output_types = [Record, Ip] opt_key_map = { RATE_LIMIT: 'rate-limit', RETRIES: 'retry', @@ -47,6 +47,11 @@ def item_loader(self, line): if isinstance(value, dict): name = value['name'] extra_data = {k: v for k, v in value.items() if k != 'name'} + if _type == 'a': + yield { + 'host': host, + 'ip': name + } yield { 'host': host, 'name': name,