def exploit_challenges():
challenges = get_challenges_paths()
status = {n: False for n,_ in challenges}
start = time.time()
results = []
with Pool(processes=len(challenges)) as pool:
multiple_results = [pool.apply_async(exploit, (name,path,)) for name, path in challenges]
for res in multiple_results:
try:
results.append(res.get(timeout=timeout+1))
except TimeoutError:
print("Got a timeout.")
duration = time.time() - start
print("All challenges exploited in " + str(duration) + " sec.")
for chall_name, exploitable in results:
status[chall_name] = exploitable
return status
评论列表
文章目录