mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 12:57:50 +08:00
修复进度条问题
This commit is contained in:
@@ -253,10 +253,8 @@ class AIOBrute(Module):
|
||||
= detect_wildcard(domain)
|
||||
tasks = self.gen_tasks(domain)
|
||||
logger.log('INFOR', f'正在爆破{domain}的域名')
|
||||
for task in tqdm.tqdm(tasks,
|
||||
desc='Progress',
|
||||
smoothing=1.0,
|
||||
ncols=True):
|
||||
for task in tqdm.tqdm(tasks, total=len(tasks),
|
||||
desc='Progress'):
|
||||
async with aiomp.Pool(processes=self.process,
|
||||
initializer=init_worker,
|
||||
childconcurrency=self.coroutine) as pool:
|
||||
@@ -343,6 +341,6 @@ def do(domain, result): # 统一入口名字 方便多线程调用
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
fire.Fire(AIOBrute)
|
||||
# result_queue = queue.Queue()
|
||||
# do('example.com', result_queue)
|
||||
# fire.Fire(AIOBrute)
|
||||
result_queue = queue.Queue()
|
||||
do('jd.com', result_queue)
|
||||
|
||||
@@ -198,9 +198,7 @@ async def bulk_get_request(datas, port):
|
||||
futures = asyncio.as_completed(tasks)
|
||||
for future in tqdm.tqdm(futures,
|
||||
total=len(tasks),
|
||||
desc='Progress',
|
||||
smoothing=1.0,
|
||||
ncols=True):
|
||||
desc='Progress'):
|
||||
await future
|
||||
|
||||
logger.log('INFOR', f'完成异步进行子域的GET请求')
|
||||
|
||||
@@ -95,9 +95,7 @@ async def bulk_query_a(datas):
|
||||
futures = asyncio.as_completed(tasks)
|
||||
for future in tqdm.tqdm(futures,
|
||||
total=len(tasks),
|
||||
desc='Progress',
|
||||
smoothing=1.0,
|
||||
ncols=True):
|
||||
desc='Progress'):
|
||||
await future
|
||||
# await asyncio.wait(tasks) # 等待所有task完成
|
||||
logger.log('INFOR', '完成异步查询子域的A记录')
|
||||
|
||||
@@ -122,7 +122,6 @@ class Takeover(Module):
|
||||
bar = tqdm()
|
||||
bar.total = len(self.subdomains)
|
||||
bar.desc = 'Progress'
|
||||
bar.ncols = True
|
||||
while True:
|
||||
done = bar.total - self.subdomainq.qsize()
|
||||
bar.n = done
|
||||
|
||||
Reference in New Issue
Block a user