cake.apk

image.png
一般情况下就是开始源码分析,再结合smali代码
image.png
查看特征
image.png

从入口函数中的onCreate开始分析
image.png

1.开始分析关键check方法

image.png

image.png

2.测试代码

破解idea:https://www.cnblogs.com/horvey/p/12247079.html

image.png

  1. package com.company;
  2. public class Main {
  3. public static String getey() {
  4. return "bobdylan";
  5. }
  6. public static void main(String[] args) {
  7. int i = 0;
  8. String str2 = getey();
  9. int[] iArr = new int[16];
  10. iArr[0] = 0;
  11. iArr[12] = 14;
  12. iArr[10] = 7;
  13. iArr[14] = 15;
  14. iArr[15] = 42;
  15. try {
  16. iArr[1] = 3;
  17. iArr[5] = 5;
  18. System.out.println();
  19. } catch (Exception e2) {
  20. iArr[5] = 37;
  21. iArr[1] = 85;
  22. }
  23. iArr[6] = 15;
  24. iArr[2] = 13;
  25. iArr[3] = 19;
  26. iArr[11] = 68;
  27. iArr[4] = 85;
  28. iArr[13] = 5;
  29. iArr[9] = 7;
  30. iArr[7] = 78;
  31. iArr[8] = 22;
  32. char pass[] = new char[16];
  33. for (int j = 0;j< 16 ;j++) {
  34. char ch = str2.charAt(j % str2.length());
  35. char ch1=(char)(iArr[j]& 255);
  36. pass[j]=(char)(ch1 ^ ch);
  37. }
  38. System.out.println(pass);
  39. }
  40. }

image.png