wp写的可以说是相当简单了
题目给了个top10000 password,使用outguess爆破
from os import system
f = open("top1000_password.txt",'r').read().splitlines()
i=0
def getNextKey():
global key
global i
key = f[i]
i += 1
return 1
def main():
while getNextKey():
cmd = "outguess -k " + key + " -r out.jpg ./output/" + key +".txt"
print(cmd)
system(cmd)
if __name__ == "__main__":
main()
outguess弄出来一堆文件后,再写个脚本查看哪个文件里有flag即可
import os
for dir,root,files in os.walk('./output'):
for file in files:
with open(os.path.join(dir,file),'r',encoding='utf-8') as f:
try:
text = f.read()
if 'flag' in text:
print(text)
except:
pass