首页
社区
课程
招聘
[原创]Android屏幕解锁图案破解 C++代码
2013-4-5 14:28 29693

[原创]Android屏幕解锁图案破解 C++代码

2013-4-5 14:28
29693
收藏
点赞3
打赏
分享
最新回复 (35)
雪    币: 11
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
vv晴天 2013-5-9 10:13
26
0
非常感谢楼主,亲测可用,但也有局限性。我要是想xx别人手机,这个文件gesture.key是系统文件,如何才能获得呢?
雪    币: 19
活跃值: (25)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
zhouxixixi 2013-5-13 13:20
27
0
看了代码,很好使。
雪    币: 209
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
李忠才 2013-5-14 15:21
28
0
这个绝对很牛,而且很实用
雪    币: 14
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
大家一起学 2013-9-14 17:55
29
0
搞起,学起
雪    币: 14
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
大家一起学 2013-9-14 18:09
30
0
我手机没root,拿不下来,肿么操作能拿下来呢,
C:\Documents and Settings\Administrator>adb pull /data/system/gesture.key gestur
e.key
failed to copy '/data/system/gesture.key' to 'gesture.key': Permission denied
雪    币: 42
活跃值: (26)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
jaix 2013-9-15 02:48
31
0
马克下。这个需要好好看看。感谢楼主分析。
雪    币: 1622
活跃值: (628)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
老道 2013-9-16 17:52
32
0
方便的话直接生成一个字典出来不就快了吗?
雪    币: 1622
活跃值: (628)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
老道 2013-9-21 08:38
33
0
private String getSalt() {
        long salt = getLong(LOCK_PASSWORD_SALT_KEY, 0);
        if (salt == 0) {
            try {
                salt = SecureRandom.getInstance("SHA1PRNG").nextLong();
                setLong(LOCK_PASSWORD_SALT_KEY, salt);
                Log.v(TAG, "Initialized lock password salt");
            } catch (NoSuchAlgorithmException e) {
                // Throw an exception rather than storing a password we'll never be able to recover
                throw new IllegalStateException("Couldn't get SecureRandom number", e);
            }
        }
        return Long.toHexString(salt);
    }

    /*
     * Generate a hash for the given password. To avoid brute force attacks, we use a salted hash.
     * Not the most secure, but it is at least a second level of protection. First level is that
     * the file is in a location only readable by the system process.
     * @param password the gesture pattern.
     * @return the hash of the pattern in a byte array.
     */
     public byte[] passwordToHash(String password) {
        if (password == null) {
            return null;
        }
        String algo = null;
        byte[] hashed = null;
        try {
            byte[] saltedPassword = (password + getSalt()).getBytes();
            byte[] sha1 = MessageDigest.getInstance(algo = "SHA-1").digest(saltedPassword);
            byte[] md5 = MessageDigest.getInstance(algo = "MD5").digest(saltedPassword);
            hashed = (toHex(sha1) + toHex(md5)).getBytes();
        } catch (NoSuchAlgorithmException e) {
            Log.w(TAG, "Failed to encode string because of missing algorithm: " + algo);
        }
        return hashed;
    }

password.key 算法顺便把这个也写了吧!
雪    币: 201
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
wvwv 2014-2-26 13:40
34
0
有没有试过三星S3,用的不是gesture.key保存的?
雪    币: 11385
活跃值: (4128)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
xie风腾 2014-2-26 13:47
35
0
来学习一下哟
雪    币: 100
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
MONKEYiiD 2014-2-26 14:33
36
0
mark~~
游客
登录 | 注册 方可回帖
返回