首先请出来我们今天的主角
如图,软件高级功能提示需要激活码,其实很好破解,今天我们就来利用软件本身的算法来破解一下
1.首先打开mt 用dex++打开
然后分析下界面 看有没有什么提示信息 以及文本 字符串信息什么的 然后去dex++里面搜索 对应信息 找到当前活动的类 就行了
2.在这个了类,换成JAVA分析下
3.EditText val$jihuoEditText 这个就是激活输入框对象
4.
this.val$jihuoEditText.getText().toString();
这个就是获取激活码输入框输入的值
if (editable.trim().equalsIgnoreCase(LL.getMD5ForJihuo(3.access$0(this.this$1)))) {
L.setJihuoPassword(3.access$0(this.this$1), editable.trim());
if (L.getPasswordAccess(3.access$0(this.this$1))) {
这一连串就是判断激活码输入是否正确
如果不找激活码算法 可以直接改判断 或者强行改返回值就行了 质量我要找激活码算法就继续分析
其实很简单 没有什么坑 很好找 只是说下思路
5.
editable.trim().equalsIgnoreCase(LL.getMD5ForJihuo(3.access$0(this.this$1))
这个就是获取到输入框的值 与 getMD5ForJihuo(3.access$0(this.this$1)
做比较
那么这个就是激活码的算法
因为莫得会员 所以手动找到 getMD5ForJihuo 所在类 Lcom/nil/model/LL;这个类
直接转成JAVA代码
6.
看到 getMD5ForJihuo方法没有 就是这个
继续分析
public static String getMD5ForJihuo(Context context) {
String md5 = L.md5(getIMEIString(context) + getFollowPassword());
return (md5 == null || md5.length() <= 6) ? md5 : md5.substring(0, 6);
}
这个方法参入的参数是context不用管参数
String md5 = L.md5(getIMEIString(context) + getFollowPassword());
这个是调用md5加密激活码
所以getIMEIString(context) + getFollowPassword
这个就是激活码
getIMEIString这个方法就获取IMEI 已给出
getFollowPassword 这个是作者自定义的方法
也在这个类里面
如图
7.
getFollowPassword这个方法返回一个
字符串luzaimou
return (md5 == null || md5.length() <= 6) ? md5 : md5.substring(0, 6);
这个是判断md5加密后是否不为空 且长度大于6
符合条件就返回通过md5加密后的激活码前6位
所以总结下 激活码就是 取IMEI加上luzaimou
进行md5加密 再截取前面6为作为最后的激活码
如图
8.这是最后的算法
public class Main
{ private static final char[] HEX_DIGITS = new char[]{‘0’, ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’, ‘9’, ‘A’, ‘B’, ‘C’, ‘D’, ‘E’, ‘F’};
public static void main(String[] args)
{
System.out.println(fuck());
}
public static String md5(String str) {
try {
MessageDigest instance = MessageDigest.getInstance(“MD5”);
instance.update(str.getBytes());
return toHexString(instance.digest());
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
return “”;
}
}
private static String toHexString(byte[] bArr)
{
StringBuilder stringBuilder = new StringBuilder(bArr.length * 2);
for (int i = 0; i < bArr.length; i++) {
stringBuilder.append(HEX_DIGITS[(bArr & 240) >>> 4]);
stringBuilder.append(HEX_DIGITS[bArr & 15]);
}
return stringBuilder.toString();
}
public static String fuck(){
String md5 = md5(“869086035107449” + “luzaimou”);
return (md5 == null || md5.length() <= 6) ? md5 : md5.substring(0, 6);
}
}
我的激活码输出如图
然后试试是否正确
显示激活成功,证明咱们的思路是正确的。教程到此结束