mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
修复aiobrute中没有传semaphore参数问题
This commit is contained in:
@@ -39,7 +39,7 @@ def aiodns_resolver():
|
||||
timeout=config.resolver_timeout)
|
||||
|
||||
|
||||
async def aiodns_query_a(hostname, semaphore):
|
||||
async def aiodns_query_a(hostname, semaphore=None):
|
||||
"""
|
||||
异步查询A记录
|
||||
|
||||
@@ -47,6 +47,8 @@ async def aiodns_query_a(hostname, semaphore):
|
||||
:param semaphore: 并发查询数量
|
||||
:return: 主机名或查询结果或查询异常
|
||||
"""
|
||||
if semaphore is None:
|
||||
semaphore = utils.get_semaphore()
|
||||
async with semaphore:
|
||||
resolver = aiodns_resolver()
|
||||
answers = await resolver.query(hostname, 'A')
|
||||
|
||||
Reference in New Issue
Block a user