I'm running the picoCTF PW Crack 5 gym challenge, but it is slow to iterate through the password list they provide for the challenge. Below is the code I'm using in the script to solve the challenge and would appreciate any explanation on how I could have sped up the process.
correct = False
with open('dictionary.txt') as pw_list:
while correct != True:
for line in pw_list:
if hash_pw(line) == correct_pw_hash:
print(line)
correct = True
else:
continue