修复进度条问题

This commit is contained in:
Jing Ling
2019-12-28 13:53:19 +08:00
parent d5f478654b
commit 9daefc9eee
4 changed files with 7 additions and 14 deletions
+5 -7
View File
@@ -253,10 +253,8 @@ class AIOBrute(Module):
= detect_wildcard(domain) = detect_wildcard(domain)
tasks = self.gen_tasks(domain) tasks = self.gen_tasks(domain)
logger.log('INFOR', f'正在爆破{domain}的域名') logger.log('INFOR', f'正在爆破{domain}的域名')
for task in tqdm.tqdm(tasks, for task in tqdm.tqdm(tasks, total=len(tasks),
desc='Progress', desc='Progress'):
smoothing=1.0,
ncols=True):
async with aiomp.Pool(processes=self.process, async with aiomp.Pool(processes=self.process,
initializer=init_worker, initializer=init_worker,
childconcurrency=self.coroutine) as pool: childconcurrency=self.coroutine) as pool:
@@ -343,6 +341,6 @@ def do(domain, result): # 统一入口名字 方便多线程调用
if __name__ == '__main__': if __name__ == '__main__':
fire.Fire(AIOBrute) # fire.Fire(AIOBrute)
# result_queue = queue.Queue() result_queue = queue.Queue()
# do('example.com', result_queue) do('jd.com', result_queue)
+1 -3
View File
@@ -198,9 +198,7 @@ async def bulk_get_request(datas, port):
futures = asyncio.as_completed(tasks) futures = asyncio.as_completed(tasks)
for future in tqdm.tqdm(futures, for future in tqdm.tqdm(futures,
total=len(tasks), total=len(tasks),
desc='Progress', desc='Progress'):
smoothing=1.0,
ncols=True):
await future await future
logger.log('INFOR', f'完成异步进行子域的GET请求') logger.log('INFOR', f'完成异步进行子域的GET请求')
+1 -3
View File
@@ -95,9 +95,7 @@ async def bulk_query_a(datas):
futures = asyncio.as_completed(tasks) futures = asyncio.as_completed(tasks)
for future in tqdm.tqdm(futures, for future in tqdm.tqdm(futures,
total=len(tasks), total=len(tasks),
desc='Progress', desc='Progress'):
smoothing=1.0,
ncols=True):
await future await future
# await asyncio.wait(tasks) # 等待所有task完成 # await asyncio.wait(tasks) # 等待所有task完成
logger.log('INFOR', '完成异步查询子域的A记录') logger.log('INFOR', '完成异步查询子域的A记录')
-1
View File
@@ -122,7 +122,6 @@ class Takeover(Module):
bar = tqdm() bar = tqdm()
bar.total = len(self.subdomains) bar.total = len(self.subdomains)
bar.desc = 'Progress' bar.desc = 'Progress'
bar.ncols = True
while True: while True:
done = bar.total - self.subdomainq.qsize() done = bar.total - self.subdomainq.qsize()
bar.n = done bar.n = done