import os,time,re,sys,subprocess os.chdir('F:\wifi\hashcat-6.2.5\hashcat-6.2.5') ab='hashcat -m 22000 BCD1.hc22000 -a 3 ?d?d?d?d?d?d?d?d -w 3 -D 2 -O --session=myx1 -o muxx.txt' jieguo="INFO: All hashes found in potfile" av=['-a 3 ?d?d?d?d?d?d?d?d','-a 3 ?d?d?d?d?d?d?d?d?d','-a 1 xing1.dic riqi.dic'] for iv in av: am='hashcat -m 22000 BCD1.hc22000 '+iv+' -w 3 -D 2 -O --session=myx1 -o muxx.txt' rea=os.popen(am) rex=rea.read() if jieguo in rex: break