去掉type字段

This commit is contained in:
Jing Ling
2020-08-18 23:09:36 +08:00
parent 17aeb02ce2
commit f24e34034c
10 changed files with 52 additions and 82 deletions
+4 -2
View File
@@ -1,5 +1,6 @@
from common.module import Module
from common import utils
from config.log import logger
class Lookup(Module):
@@ -9,18 +10,19 @@ class Lookup(Module):
def __init__(self):
Module.__init__(self)
self.qtype = ''
def query(self):
"""
Query the TXT record of domain
:return: query result
"""
answer = utils.dns_query(self.domain, self.type)
answer = utils.dns_query(self.domain, self.qtype)
if answer is None:
return None
for item in answer:
record = item.to_text()
subdomains = self.match_subdomains(record)
self.subdomains = self.subdomains.union(subdomains)
self.gen_record(subdomains, record)
logger.log('DEBUG', record)
return self.subdomains