def Steg_brute(ifile, dicc):
i = 0
ofile = ifile.split('.')[0] + "_flag.txt"
nlines = len(open(dicc).readlines())
with open(dicc, 'r') as passFile:
pbar = ProgressBar(widgets=[Percentage(), Bar()], maxval=nlines).start()
for line in passFile.readlines():
password = line.strip('\n')
r = commands.getoutput("steghide extract -sf %s -p '%s' -xf %s" % (ifile, password, ofile))
if not "no pude extraer" in r and not "could not extract" in r:
print(color.GREEN + "\n\n " + r + color.ENDC)
print("\n\n [+] " + color.INFO + "Information obtained with password:" + color.GREEN + " %s\n" % password + color.ENDC)
if check_file(ofile):
with open(ofile, 'r') as outfile:
for line in outfile.readlines():
print(line)
break
pbar.update(i + 1)
i += 1
评论列表
文章目录