导航菜单

页面标题

页面副标题

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

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

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


package com.zx.a.I8b7;

import android.content.ContentValues;
import android.database.sqlite.SQLiteDatabase;
import android.text.TextUtils;
import android.util.Base64;
import com.zx.a.I8b7.l1;
import com.zx.a.I8b7.w0;
import java.io.IOException;
import javax.crypto.SecretKey;
import net.sqlcipher.BuildConfig;
import org.json.JSONObject;

public class x {

    public static SecretKey f2030a;

    public static void a() throws Exception {
        String str;
        w0.a aVar = new w0.a();
        byte[] bArr = new byte[16];
        f2030a = i.b(bArr, j2.b(j2.h));
        a0.a(aVar, Base64.encodeToString(bArr, 2));
        w0.a a2 = aVar.a("https://zxid-m.mobileservice.cn/sdk/module/getCoreModule");
        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());
        a2.d = y0.a(b2, Base64.encodeToString(i.a(jSONObject.toString(), f2030a, "UDID_ENC_AUTHTAG"), 2));
        a2.e = "request getCoreModule 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), f2030a, "UDID_ENC_AUTHTAG"));
        if (!jSONObject3.getBoolean("enable")) {
            p2 p2Var = l1.a.f1930a.f1929a;
            if (p2Var.f1981b == null) {
                p2Var.f1981b = p2Var.d();
            }
            try {
                SQLiteDatabase sQLiteDatabase = p2Var.f1981b;
                StringBuilder sb = new StringBuilder();
                sb.append("key in(");
                sb.append(17 + com.igexin.push.core.b.ak + 18);
                sb.append(")");
                sQLiteDatabase.delete("zx_table", sb.toString(), null);
                j2.C = null;
                q1.a("clearCoreModule success");
            } catch (Exception e) {
                StringBuilder a4 = b2.a("clearCoreModule error:");
                a4.append(e.getMessage());
                q1.b(a4.toString());
            }
            q1.a("coreModule enable is false");
            return;
        }
        JSONObject jSONObject4 = jSONObject3.getJSONObject("module");
        jSONObject4.getString("version");
        String string = jSONObject4.getString("checksum");
        byte[] decode = Base64.decode(jSONObject4.getString("data"), 0);
        if (!TextUtils.equals(string, i.a(i.a("SHA256", decode)))) {
            throw new IOException("zx checksum1 exception");
        }
        q1.a("verify checksum finished");
        JSONObject jSONObject5 = new JSONObject();
        jSONObject5.put("mainVersion", j2.f1923b);
        jSONObject5.put("coreVersion", j2.d);
        jSONObject5.put("checksum", string);
        l1.a.f1930a.f1929a.getClass();
        String string2 = jSONObject5.getString("coreVersion");
        try {
            str = j2.C.getString("coreVersion");
        } catch (Exception unused) {
            str = BuildConfig.FLAVOR;
        }
        if (!TextUtils.isEmpty(string2) && !TextUtils.equals(string2, str)) {
            p2 p2Var2 = l1.a.f1930a.f1929a;
            if (p2Var2.f1981b == null) {
                p2Var2.f1981b = p2Var2.d();
            }
            try {
                String encodeToString = Base64.encodeToString(i.b("AES/CBC/PKCS5Padding", j2.s, j2.t, decode), 0);
                ContentValues contentValues = new ContentValues();
                contentValues.put("key", (Integer) 17);
                contentValues.put("value", encodeToString);
                q1.a("replace resultId = " + p2Var2.f1981b.replace("zx_table", null, contentValues));
            } catch (Exception e2) {
                q1.b("ZXID updateDBValue valueID:17,value:" + decode + ",error:" + e2.toString());
            }
            l1.a.f1930a.f1929a.a(18, jSONObject5.toString(), true);
            j2.C = jSONObject5;
        }
        q1.a("decrypt and checksum finished");
    }
}