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