fcrack.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:Python-Pentest-Tools 作者: proxyanon 项目源码 文件源码
def run_chars(strhash, initial, final, chars, types):
    starttime = gmtime()[5]
    for n in range(initial, final + 1):
        for xs in product(chars, repeat=n):
            string=''.join(xs)
            if types == "md5" or types == "MD5":
                password = md5(string).hexdigest()
            elif types == "sha1" or types == "SHA1":
                password = sha1(string).hexdigest()
            elif types == "sha512" or types == "SHA512":
                password = sha512(string).hexdigest()
            else:
                print "[-] Este formato nao esta incluso no script, talvez voce tenha que fazer isso manualmente"
                exit()
            if strhash == password:
                final = gmtime()[5] - starttime
                print "\n[+] Crackeada => %s\n"%(string)
                print "[+] Duracao => %i segundos\n"%(final)
                print "\a"
                stdout.flush()
                exit()
            else:
                print "[-] Tentando => %s"%(string)
    final = gmtime()[5] - starttime
    print "\n[+] Duracao => %i segundos\n"%(final)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号