导航菜单

页面标题

页面副标题

管控平台 v5.2.3.0. - g.java 源代码

正在查看: 管控平台 v5.2.3.0. 应用的 g.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.zx.a.I8b7;

import android.text.TextUtils;
import android.util.Base64;
import com.zx.a.I8b7.l1;
import com.zx.a.I8b7.w0;
import java.nio.charset.StandardCharsets;
import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;
import net.sqlcipher.BuildConfig;
import org.json.JSONArray;
import org.json.JSONObject;

public class g {

    public static SecretKey f1886a;

    public static byte[] f1887b;

    public static void a() throws Exception {
        w0.a aVar = new w0.a();
        byte[] bArr = new byte[16];
        f1887b = bArr;
        f1886a = i.b(bArr, j2.b(j2.h));
        a0.a(aVar, Base64.encodeToString(f1887b, 2));
        w0.a a2 = aVar.a("https://zxid-m.mobileservice.cn/sdk/config/init");
        a2.f2027b = "POST";
        m0 b2 = m0.b("application/json; charset=utf-8");
        JSONObject jSONObject = new JSONObject();
        JSONObject jSONObject2 = new JSONObject();
        jSONObject2.put("lid", j2.b(j2.h));
        jSONObject2.put("zid", j2.i);
        jSONObject.put("ctx", jSONObject2);
        jSONObject.put("sdkInfo", a0.d());
        jSONObject.put("deviceInfo", a0.b());
        a2.d = y0.a(b2, Base64.encodeToString(i.a(jSONObject.toString(), f1886a, "UDID_ENC_AUTHTAG"), 2));
        a2.e = "request config api";
        n1 n1Var = a0.f1865a;
        w0 w0Var = new w0(aVar);
        n1Var.getClass();
        z0 a3 = new s0(n1Var, w0Var).a();
        if (a3.f2036b != 200) {
            throw new RuntimeException("response errCode: " + a3.a("Udid-Error-Code") + ", errMsg: " + a3.a("Udid-Error-Message"));
        }
        JSONObject jSONObject3 = new JSONObject(i.a(Base64.decode(new JSONObject(a3.e.c()).getString("data"), 2), f1886a, "UDID_ENC_AUTHTAG"));
        String string = jSONObject3.getString("configVersion");
        l1 l1Var = l1.a.f1930a;
        l1Var.f1929a.getClass();
        if (!TextUtils.equals(string, j2.l)) {
            j2.l = string;
            l1Var.f1929a.a(4, string, false);
        }
        JSONObject jSONObject4 = jSONObject3.getJSONObject("fieldConfig");
        p2 p2Var = l1Var.f1929a;
        String jSONObject5 = jSONObject4.toString();
        p2Var.getClass();
        if (!TextUtils.equals(jSONObject5, j2.u)) {
            j2.u = jSONObject5;
            l1Var.f1929a.a(11, jSONObject5, true);
        }
        JSONObject jSONObject6 = jSONObject3.getJSONObject("reportConfig");
        p2 p2Var2 = l1Var.f1929a;
        String jSONObject7 = jSONObject6.toString();
        p2Var2.getClass();
        if (!TextUtils.equals(jSONObject7, j2.v)) {
            j2.v = jSONObject7;
            l1Var.f1929a.a(12, jSONObject7, true);
        }
        JSONObject jSONObject8 = jSONObject3.getJSONObject("cryptoConfig");
        p2 p2Var3 = l1Var.f1929a;
        String jSONObject9 = jSONObject8.toString();
        p2Var3.getClass();
        if (!TextUtils.equals(jSONObject9, j2.w)) {
            j2.w = jSONObject9;
            l1Var.f1929a.a(15, jSONObject9, true);
        }
        JSONObject optJSONObject = jSONObject3.optJSONObject("appConfig");
        if (optJSONObject != null) {
            q1.a("处理 appConfig ");
            try {
                JSONArray jSONArray = optJSONObject.getJSONArray("list");
                if (jSONArray == null || jSONArray.length() <= 0) {
                    q1.b("appConfig list is empty");
                } else {
                    int length = jSONArray.length();
                    int i = optJSONObject.getInt("type");
                    if (i == 1) {
                        for (int i2 = 0; i2 < length; i2++) {
                            jSONArray.put(i2, i.a(Base64.decode(jSONArray.getString(i2), 2), f1886a, "UDID_ENC_AUTHTAG"));
                        }
                    } else if (i == 3) {
                        SecretKey a4 = i.a(f1887b, j2.b(j2.h));
                        for (int i3 = 0; i3 < length; i3++) {
                            jSONArray.put(i3, new String(i.a("AES/CBC/PKCS7Padding", a4, new IvParameterSpec("UDID_ENC_AUTHTAG".getBytes(StandardCharsets.UTF_8)), Base64.decode(jSONArray.getString(i3), 2)), StandardCharsets.UTF_8));
                        }
                    }
                    l1 l1Var2 = l1.a.f1930a;
                    p2 p2Var4 = l1Var2.f1929a;
                    String jSONObject10 = optJSONObject.toString();
                    p2Var4.getClass();
                    if (!TextUtils.equals(jSONObject10, j2.x)) {
                        j2.x = jSONObject10;
                        l1Var2.f1929a.a(21, jSONObject10, true);
                    }
                }
            } catch (Exception e) {
                q1.a(e);
            }
        }
        JSONObject optJSONObject2 = jSONObject3.optJSONObject("commonConfig");
        if (optJSONObject2 != null) {
            l1 l1Var3 = l1.a.f1930a;
            p2 p2Var5 = l1Var3.f1929a;
            String jSONObject11 = optJSONObject2.toString();
            p2Var5.getClass();
            if (!TextUtils.equals(jSONObject11, j2.y)) {
                j2.y = jSONObject11;
                l1Var3.f1929a.a(22, jSONObject11, true);
            }
        }
        JSONObject optJSONObject3 = jSONObject3.optJSONObject("invokeConfig");
        if (optJSONObject3 != null) {
            l1 l1Var4 = l1.a.f1930a;
            p2 p2Var6 = l1Var4.f1929a;
            String jSONObject12 = optJSONObject3.toString();
            synchronized (p2Var6) {
                if (!TextUtils.equals(jSONObject12, j2.z)) {
                    j2.z = jSONObject12;
                    j2.c();
                    l1Var4.f1929a.a(19, j2.z, true);
                }
            }
        }
        if (j2.m) {
            return;
        }
        l1 l1Var5 = l1.a.f1930a;
        l1Var5.f1929a.getClass();
        if (true != j2.m) {
            j2.m = true;
            l1Var5.f1929a.a(6, j2.m + BuildConfig.FLAVOR, false);
        }
    }
}