mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
添加无有效解析结果处理
This commit is contained in:
+3
-1
@@ -16,7 +16,6 @@ import secrets
|
||||
import exrex
|
||||
import fire
|
||||
import tenacity
|
||||
from tenacity import RetryError
|
||||
from dns.exception import Timeout
|
||||
from dns.resolver import NXDOMAIN, YXDOMAIN, NoAnswer, NoNameservers
|
||||
|
||||
@@ -361,6 +360,9 @@ def deal_output(output_path, ip_times, wildcard_ips, wildcard_ttl):
|
||||
records, subdomains = gen_records(items, records, subdomains,
|
||||
ip_times, wildcard_ips,
|
||||
wildcard_ttl)
|
||||
if not records:
|
||||
logger.log('FATAL', f'无有效解析结果')
|
||||
exit(1)
|
||||
return records, subdomains
|
||||
|
||||
|
||||
|
||||
@@ -121,7 +121,10 @@ def deal_output(output_path):
|
||||
record['resolve'] = 0
|
||||
record['reason'] = 'NOARECORD'
|
||||
records[qname] = record
|
||||
return records
|
||||
if not records:
|
||||
logger.log('FATAL', f'无有效解析结果')
|
||||
exit(1)
|
||||
return records
|
||||
|
||||
|
||||
def run_resolve(domain, data):
|
||||
|
||||
Reference in New Issue
Block a user