mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-10-27 19:06:53 +08:00
优化代码结构 删除无用队列结果集参数
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
"""
|
||||
检查域名证书收集子域名
|
||||
"""
|
||||
import queue
|
||||
import socket
|
||||
import ssl
|
||||
|
||||
@@ -36,7 +35,7 @@ class CheckCert(Module):
|
||||
subdomains_find = utils.match_subdomain(self.domain, str(cert_dict))
|
||||
self.subdomains = self.subdomains.union(subdomains_find)
|
||||
|
||||
def run(self, rx_queue):
|
||||
def run(self):
|
||||
"""
|
||||
类执行入口
|
||||
"""
|
||||
@@ -45,22 +44,19 @@ class CheckCert(Module):
|
||||
self.save_json()
|
||||
self.gen_result()
|
||||
self.save_db()
|
||||
rx_queue.put(self.results)
|
||||
logger.log('DEBUG', f'结束执行{self.source}检查{self.domain}域的证书中的子域')
|
||||
self.finish()
|
||||
|
||||
|
||||
def do(domain, rx_queue): # 统一入口名字 方便多线程调用
|
||||
def do(domain): # 统一入口名字 方便多线程调用
|
||||
"""
|
||||
类统一调用入口
|
||||
|
||||
:param str domain: 域名
|
||||
:param rx_queue: 结果集队列
|
||||
"""
|
||||
check = CheckCert(domain)
|
||||
check.run(rx_queue)
|
||||
check.run()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
result_queue = queue.Queue()
|
||||
do('example.com', result_queue)
|
||||
do('example.com')
|
||||
|
||||
Reference in New Issue
Block a user