mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-25 20:37:48 +08:00
去掉type字段
This commit is contained in:
+4
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user