码迷,mamicode.com
首页 > 移动开发 > 详细

暴力尝试安卓gesture.key

时间:2015-03-16 21:00:49      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:

import hashlib
import os
import itertools


f = open(rD:\KEY\gesture.key,r)
psd = f.readline()
f.close()
ANS = psd.encode(hex)
print ANS


b = [00,01,02,03,04,05,06,07,08]


cool = False

for i in range(9,10):
    qq = itertools.permutations(b,i)
    nl = list(qq)
    for j in range(0,len(nl)):
        t1=‘‘.join(nl[j])
        t2 = hashlib.sha1(t1.decode(hex)).hexdigest()
        if(t2==ANS):
            print the answer is :+str(nl[j])
            cool = True
            break;
        if(cool==True):
            break;
    if(cool==True):
        break;

if(cool==False):
    print Sorry...

 

暴力尝试安卓gesture.key

标签:

原文地址:http://www.cnblogs.com/fish7/p/4342625.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!