看个比赛 v1.5.8版本的 MD5 值为:bae84dbc8ef3ad62286d0d7fe5c3e37f
以下内容为反编译后的 h.java 源代码,内容仅作参考
package com.zx.a.I8b7;
import android.text.TextUtils;
import android.util.Base64;
import com.taobao.weex.ui.component.WXBasicComponentType;
import com.tencent.connect.common.Constants;
import com.zx.a.I8b7.a1;
import com.zx.a.I8b7.t1;
import com.zx.module.annotation.Java2C;
import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;
import java.util.HashMap;
import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;
import org.json.JSONArray;
import org.json.JSONObject;
public class h {
public static SecretKey a;
public static byte[] b;
public static final SecureRandom c = new SecureRandom();
@Java2C.Method2C
public static native synchronized String a();
@Java2C.Method2C
private static native String b() throws Exception;
public static void c() throws Exception {
a1.a aVar = new a1.a();
HashMap<String, String> b2 = w.b(a());
aVar.c.clear();
aVar.c.putAll(b2);
a1.a a2 = aVar.a("https://zxid-m.mobileservice.cn/sdk/config/init");
a2.b = Constants.HTTP_POST;
a2.d = c1.a(m0.b("application/json; charset=utf-8"), b());
a2.e = "request config api";
v1 v1Var = w.a;
a1 a1Var = new a1(aVar);
v1Var.getClass();
d1 a3 = new t0(v1Var, a1Var).a();
if (a3.b == 200) {
JSONObject jSONObject = new JSONObject(j.a(Base64.decode(new JSONObject(a3.e.b()).getString("data"), 2), a, "UDID_ENC_AUTHTAG"));
String string = jSONObject.getString("configVersion");
t1 t1Var = t1.a.a;
t1Var.a.getClass();
if (!TextUtils.equals(string, t2.n)) {
t2.n = string;
t1Var.a.a(4, string, false);
}
JSONObject jSONObject2 = jSONObject.getJSONObject("fieldConfig");
b3 b3Var = t1Var.a;
String jSONObject3 = jSONObject2.toString();
b3Var.getClass();
if (!TextUtils.equals(jSONObject3, t2.w)) {
t2.w = jSONObject3;
t1Var.a.a(11, jSONObject3, true);
}
JSONObject jSONObject4 = jSONObject.getJSONObject("reportConfig");
b3 b3Var2 = t1Var.a;
String jSONObject5 = jSONObject4.toString();
b3Var2.getClass();
if (!TextUtils.equals(jSONObject5, t2.x)) {
t2.x = jSONObject5;
t1Var.a.a(12, jSONObject5, true);
}
JSONObject jSONObject6 = jSONObject.getJSONObject("cryptoConfig");
b3 b3Var3 = t1Var.a;
String jSONObject7 = jSONObject6.toString();
b3Var3.getClass();
if (!TextUtils.equals(jSONObject7, t2.y)) {
t2.y = jSONObject7;
t1Var.a.a(15, jSONObject7, true);
}
JSONObject optJSONObject = jSONObject.optJSONObject("appConfig");
if (optJSONObject != null) {
y1.a("处理 appConfig ");
try {
JSONArray jSONArray = optJSONObject.getJSONArray(WXBasicComponentType.LIST);
if (jSONArray != null && jSONArray.length() > 0) {
int length = jSONArray.length();
int i = optJSONObject.getInt("type");
if (i == 1) {
for (int i2 = 0; i2 < length; i2++) {
jSONArray.put(i2, j.a(Base64.decode(jSONArray.getString(i2), 2), a, "UDID_ENC_AUTHTAG"));
}
} else if (i == 3) {
SecretKey a4 = j.a(b, t2.a(t2.h));
for (int i3 = 0; i3 < length; i3++) {
jSONArray.put(i3, new String(j.a("AES/CBC/PKCS7Padding", a4, new IvParameterSpec("UDID_ENC_AUTHTAG".getBytes(StandardCharsets.UTF_8)), Base64.decode(jSONArray.getString(i3), 2)), StandardCharsets.UTF_8));
}
}
t1 t1Var2 = t1.a.a;
b3 b3Var4 = t1Var2.a;
String jSONObject8 = optJSONObject.toString();
b3Var4.getClass();
if (!TextUtils.equals(jSONObject8, t2.z)) {
t2.z = jSONObject8;
t1Var2.a.a(21, jSONObject8, true);
}
} else {
y1.b("appConfig list is empty");
}
} catch (Exception e) {
y1.a(e);
}
}
JSONObject optJSONObject2 = jSONObject.optJSONObject("commonConfig");
if (optJSONObject2 != null) {
t1 t1Var3 = t1.a.a;
b3 b3Var5 = t1Var3.a;
String jSONObject9 = optJSONObject2.toString();
b3Var5.getClass();
if (!TextUtils.equals(jSONObject9, t2.A)) {
t2.A = jSONObject9;
t1Var3.a.a(22, jSONObject9, true);
}
}
JSONObject optJSONObject3 = jSONObject.optJSONObject("invokeConfig");
if (optJSONObject3 != null) {
t1 t1Var4 = t1.a.a;
b3 b3Var6 = t1Var4.a;
String jSONObject10 = optJSONObject3.toString();
synchronized (b3Var6) {
if (!TextUtils.equals(jSONObject10, t2.B)) {
t2.B = jSONObject10;
t2.c();
t1Var4.a.a(19, t2.B, true);
}
}
}
if (t2.o) {
return;
}
t1 t1Var5 = t1.a.a;
t1Var5.a.getClass();
if (true != t2.o) {
t2.o = true;
t1Var5.a.a(6, t2.o + "", false);
return;
}
return;
}
throw new RuntimeException("response errCode: " + a3.a("Udid-Error-Code") + ", errMsg: " + a3.a("Udid-Error-Message"));
}
}