1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
| String j2 = com.bilibili.api.a.j(); if (!TextUtils.isEmpty(j2)) { aVar.h("fp_local", j2); }
public static String j() { a(); return b.F(); }
-上面确认过了:找到b的类---》真正的类是tv.danmaku.bili.utils.p.a
public String F() { String a = c2.f.b0.c.a.c.a(); kotlin.jvm.internal.x.h(a, "BiliIds.buvidLocal()"); return a; }
public static String a() { return Fingerprint.h.c(); }
public final String c() { String str = ""; if (k()) { ReentrantReadWriteLock.ReadLock r = e; x.h(r, "r"); r.lock(); try { if (a != null && (str = a) == null) { x.Q("buvidLocal"); } } finally { r.unlock(); } } return str; }
-换另一个版本的jadx试一下--》用了一个老版本:1.2.0版本--》可以的 -换别的反编译工具:GDA。。 -老版本的jadx内存分配大小可能很小,导致反编译不成功---》修改jadx能使用的内存大小 -打开jadx.bat-->记事本打开,修改 DEFAULT_JVM_OPTS="-Xms128M" "-Xmx16g" -新版本对e函数反编译失败--》看不到 -1.2.0版本对e反编译成功了--在e中找了a的赋值位置
-1 String d2 = k.d(); -2 d2 = com.bilibili.lib.biliid.internal.fingerprint.a.a.a(a2, aVar); -3 x.K();
public static final String a(String str, com.bilibili.lib.biliid.internal.fingerprint.b.a aVar) { String str2 = MiscHelperKt.a(f(str, aVar)) + h() + MiscHelperKt.a(g()); return str2 + b(str2); }
1d6a9c1ac4f284329263021dc511149f 20230810190748636 c2890a1385da9 6f
private static final String h() { String format = a.format(new Date(System.currentTimeMillis())); return format; }
private static final byte[] f(String str, com.bilibili.lib.biliid.internal.fingerprint.b.a aVar) { Map<String, String> a2 = aVar.a(); return e(str + a2.get(PersistEnv.KEY_PUB_MODEL) + a2.get("band")); }
根据:PersistEnv.KEY_PUB_MODEL取值本质就是--》model---》手机型号 根据:band取值---》手机品牌
private static final byte[] e(String str) { try { MessageDigest instance = MessageDigest.getInstance("MD5"); Charset forName = Charset.forName("UTF-8"); x.h(forName, "Charset.forName(\"UTF-8\")"); if (str != null) { byte[] bytes = str.getBytes(forName); x.h(bytes, "(this as java.lang.String).getBytes(charset)"); byte[] digest = instance.digest(bytes); x.h(digest, "digest"); return digest; } throw new TypeCastException("null cannot be cast to non-null type java.lang.String"); } catch (Exception unused) { return new byte[16]; } }
String str2 = MiscHelperKt.a(md5(buvid+手机型号+手机品牌)) + 年月日十分秒 + MiscHelperKt.a(g()); return str2 + b(str2);
private static final byte[] g() { byte[] a2 = com.bilibili.commons.e.a(8); x.h(a2, "RandomUtils.nextBytes(SALT_BYTES)"); return a2; }
private static final Random a = new Random(); public static byte[] a(int i) { h.b(i >= 0, "Count cannot be negative.", new Object[0]); byte[] bArr = new byte[i]; a.nextBytes(bArr); return bArr; }
String str2 = MiscHelperKt.a(md5(buvid+手机型号+手机品牌)) + 年月日十分秒 + MiscHelperKt.a(随机生成8个字符); return str2 + b(str2);
public static final String a(byte[] bArr) { x.q(bArr, "$this$asHex");
return f.Oe(bArr, "", null, null, 0, null, MiscHelperKt$asHex$1.INSTANCE, 30, null); }
-GDA:下载地址:http://www.gda.wiki:9090/ 使用免费版就够了 -下载,解压开即用--》把apk拖入即可
public static String Oe(byte[] p0,CharSequence p1,CharSequence p2,CharSequence p3,int p4,CharSequence p5,l p6,int p7,Object p8){ return ArraysKt___ArraysKt.Oe(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
public static String Oe(byte[] p0,CharSequence p1,CharSequence p2,CharSequence p3,int p4,CharSequence p5,l p6,int p7,Object p8){ String str; String str2; int i1; if ((p7 & 0x01)) { str = ", "; } String str1 = ""; p8 = ((p7 & 0x02))? str1: p2; if (!((p7 & 0x04))) { str1 = p3; } int i = ((p7 & 0x08))? -1: p4; if ((p7 & 0x10)) { str2 = "..."; } String str3 = str2; if ((p7 & 0x20)) { p6 = null; } return ArraysKt___ArraysKt.Fe(p0, str, p8, str1, i, str3, p6); }
public static final String Fe(byte[] p0,CharSequence p1,CharSequence p2,CharSequence p3,int p4,CharSequence p5,l p6){ x.q(p0, "$this$joinToString"); x.q(p1, "separator"); x.q(p2, "prefix"); x.q(p3, "postfix"); x.q(p5, "truncated"); String str = ArraysKt___ArraysKt.ne(p0, "", p1, p2, p3, p4, p5, p6); x.h(str, "joinTo\(StringBuilder\(\), …ed, transform\).toString\(\)"); return str; }
public static final Appendable ne(byte[] p0,Appendable p1,CharSequence p2,CharSequence p3,CharSequence p4,int p5,CharSequence p6,l p7){ p1.append(p3); int len = p0.length; int i = 0; int i1 = 0; while (true) { if (i < len) { byte b = p0[i]; if ((i1 = i1 + 1) > 1) { p1.append(p2); } if (p5 < 0 || i1 <= p5) { if (p7 != null) { p1.append(p7.invoke(Byte.valueOf(b))); }else { p1.append(String.valueOf(b)); } i = i + 1; }else if(p5 >= 0 && i1 > p5){ p1.append(p6); break ; } break ; }else { } } p1.append(p4); return p1; }
public final String invoke(byte b) { e0 e0Var = e0.a; String format = String.format("%02x", Arrays.copyOf(new Object[]{Byte.valueOf(b)}, 1)); x.h(format, "java.lang.String.format(format, *args)"); return format; }
String str2 = MiscHelperKt.a(md5(buvid+手机型号+手机品牌)) + 年月日十分秒 + MiscHelperKt.a(随机生成8个字符); return str2 + b(str2);
MiscHelperKt.a(md5(buvid+手机型号+手机品牌)):1d6a9c1ac4f284329263021dc511149f h():20230810190748636 MiscHelperKt.a(随机生成8个字符):c2890a1385da9 b(str2):6f
public static final String b(String str) { int i; i iVar = q.S0(q.n1(0, Math.min(str.length() - 1, 62)), 2); int g = iVar.g(); int h = iVar.h(); int i2 = iVar.i(); if (i2 < 0 ? g >= h : g <= h) { i = 0; while (true) { String substring = str.substring(g, g + 2); x.h(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)"); i += Integer.parseInt(substring, b.a(16)); if (g == h) { break; } g += i2; } } else { i = 0; } e0 e0Var = e0.a; String format = String.format("%02x", Arrays.copyOf(new Object[]{Integer.valueOf(i % 256)}, 1)); x.h(format, "java.lang.String.format(format, *args)"); return format; }
int g = iVar.g(); int h = iVar.h(); int i2 = iVar.i(); 并把它打印出来,看是不是固定的
g= 0 h= 60 i= 2
|