Advertisement
FlyFar

tools/GetDBKey.class

Oct 28th, 2023 (edited)
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.74 KB | Cybersecurity | 0 0
  1. import java.io.FileInputStream;
  2. import java.io.ObjectInputStream;
  3. import java.security.MessageDigest;
  4. import java.util.HashMap;
  5.  
  6. public class GetDBKey {
  7.    public static void main(String[] var0) {
  8.       try {
  9.          ObjectInputStream var1 = new ObjectInputStream(new FileInputStream("CompatibleInfo.cfg"));
  10.          Object var2 = var1.readObject();
  11.          HashMap var3 = (HashMap)var2;
  12.          String var4 = String.valueOf(var3.get(258));
  13.          System.out.println("IMEI:" + var4);
  14.          ObjectInputStream var5 = new ObjectInputStream(new FileInputStream("systemInfo.cfg"));
  15.          Object var6 = var5.readObject();
  16.          HashMap var7 = (HashMap)var6;
  17.          String var8 = String.valueOf(var7.get(1));
  18.          System.out.println("uin:" + var8);
  19.          var4 = var4 + var8;
  20.          var4 = encode(var4);
  21.          System.out.println("密码是 : " + var4.substring(0, 7));
  22.          var1.close();
  23.          var5.close();
  24.       } catch (Exception var9) {
  25.          var9.printStackTrace();
  26.       }
  27.  
  28.    }
  29.  
  30.    public static String encode(String var0) {
  31.       try {
  32.          MessageDigest var1 = MessageDigest.getInstance("MD5");
  33.          var1.update(var0.getBytes());
  34.          return getEncode32(var1);
  35.       } catch (Exception var2) {
  36.          var2.printStackTrace();
  37.          return null;
  38.       }
  39.    }
  40.  
  41.    private static String getEncode32(MessageDigest var0) {
  42.       StringBuilder var1 = new StringBuilder();
  43.       byte[] var2 = var0.digest();
  44.       int var3 = var2.length;
  45.  
  46.       for(int var4 = 0; var4 < var3; ++var4) {
  47.          byte var5 = var2[var4];
  48.          var1.append(Integer.toHexString(var5 >> 4 & 15));
  49.          var1.append(Integer.toHexString(var5 & 15));
  50.       }
  51.  
  52.       return var1.toString();
  53.    }
  54. }
  55.    
Tags: Java file class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement