导航菜单

页面标题

页面副标题

万能钥匙 v1.1.23 - bj.java 源代码

正在查看: 万能钥匙 v1.1.23 应用的 bj.java JAVA 源代码文件

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


package cn.fly.verify;

import android.content.Context;
import android.net.Network;
import android.os.SystemClock;
import android.text.TextUtils;
import androidx.core.app.NotificationCompat;
import cn.fly.verify.common.exception.VerifyErr;
import cn.fly.verify.common.exception.VerifyException;
import cn.fly.verify.gx;
import cn.fly.verify.pure.entity.PreVerifyResult;
import cn.fly.verify.pure.entity.VerifyResult;
import java.net.URLDecoder;
import org.json.JSONObject;

public class bj {

    private Network f7994a;

    public void a(String str, String str2, cn.fly.verify.common.callback.b bVar, e eVar, boolean z) {
        VerifyException verifyException;
        f a10 = f.a();
        StringBuilder sb2 = new StringBuilder();
        sb2.append("wo ");
        sb2.append(z ? "preverify" : "verify");
        a10.a(sb2.toString());
        String b10 = bo.b();
        Context g10 = cl.g();
        try {
            String a11 = bo.a(1, b10, str, str2);
            if (TextUtils.isEmpty(a11)) {
                throw new Throwable("请求参数为空");
            }
            String a12 = bq.a(a11, "&");
            if (TextUtils.isEmpty(a12)) {
                throw new Throwable("参数格式异常");
            }
            String str3 = "https://opencloud.wostore.cn/openapi/netauth/precheck/wp?" + a12;
            if ("wifi".equalsIgnoreCase(by.h()) && ch.b(g10)) {
                try {
                    if (gx.d.b("android.permission.CHANGE_NETWORK_STATE")) {
                        if (eVar != null) {
                            eVar.a("CUXW", str, "switch_s");
                        }
                        this.f7994a = new bv().a("https://opencloud.wostore.cn/openapi/netauth/precheck/wp?");
                        if (eVar != null) {
                            eVar.a("CUXW", str, "switch_e");
                        }
                    } else {
                        f.a().d("[FlyVerify] ==>%s", "switch no permission");
                        if (eVar != null) {
                            c b11 = eVar.b("switch_e");
                            b11.f("CUXW");
                            b11.e(str);
                            VerifyErr verifyErr = VerifyErr.INNER_NO_SWITCH_PERMISSION_ERR;
                            b11.b(verifyErr.getCode());
                            b11.d(verifyErr.getMessage());
                            eVar.a(b11);
                        }
                    }
                } catch (Throwable th) {
                    f.a().d("[FlyVerify] ==>%s", "switch failure " + th);
                    if (eVar != null) {
                        c b12 = eVar.b("switch_e");
                        b12.f("CUXW");
                        b12.e(str);
                        b12.b(VerifyErr.INNER_SWITCH_EXCEPTION_ERR.getCode());
                        b12.d(ch.a(th));
                        eVar.a(b12);
                    }
                }
            }
            String str4 = BuildConfig.FLAVOR;
            long elapsedRealtime = SystemClock.elapsedRealtime();
            if (eVar != null) {
                eVar.a("CUXW", str, "request_start");
            }
            try {
                str4 = new bl().a(str3, bo.a(), this.f7994a);
            } catch (Throwable th2) {
                VerifyException verifyException2 = new VerifyException(VerifyErr.INNER_OTHER_EXCEPTION_ERR.getCode(), ch.a(th2));
                if (bVar != null) {
                    bVar.a(verifyException2);
                }
            }
            if (TextUtils.isEmpty(str4)) {
                throw new Throwable("http response empty");
            }
            f.a().a("wo response " + str4);
            if (eVar != null) {
                eVar.a("CUXW", str, "request_end", String.valueOf(SystemClock.elapsedRealtime() - elapsedRealtime));
            }
            try {
                JSONObject jSONObject = new JSONObject(str4);
                int optInt = jSONObject.optInt("code", 1);
                String optString = jSONObject.optString(NotificationCompat.CATEGORY_MESSAGE, "未知错误");
                String optString2 = jSONObject.optString("data");
                if (optInt != 0) {
                    VerifyException verifyException3 = new VerifyException(optInt, optString);
                    if (bVar != null) {
                        bVar.a(verifyException3);
                        return;
                    }
                    return;
                }
                try {
                    String a13 = bh.a(optString2, b10);
                    if (TextUtils.isEmpty(a13)) {
                        throw new Throwable("AESDecode response empty");
                    }
                    try {
                        String decode = URLDecoder.decode(a13, "UTF-8");
                        if (TextUtils.isEmpty(decode)) {
                            throw new Throwable("URLDecode response empty");
                        }
                        JSONObject jSONObject2 = new JSONObject(decode);
                        String optString3 = jSONObject2.optString("accessCode");
                        long optLong = jSONObject2.optLong("expires");
                        String optString4 = jSONObject2.optString("mobile");
                        if (TextUtils.isEmpty(optString4) || TextUtils.isEmpty(optString3)) {
                            return;
                        }
                        if (z) {
                            long currentTimeMillis = (optLong * 1000) + System.currentTimeMillis();
                            jSONObject2.put("expires", currentTimeMillis);
                            PreVerifyResult preVerifyResult = new PreVerifyResult(optString4, "CUCC", currentTimeMillis, "CUXW");
                            bf.c(jSONObject2.toString());
                            bf.d(str);
                            bf.a(ch.d());
                            if (bVar != null) {
                                bVar.a((cn.fly.verify.common.callback.b) preVerifyResult);
                                return;
                            }
                            return;
                        }
                        bt.a().b(0);
                        bt.a().a(optLong);
                        VerifyResult verifyResult = new VerifyResult(optString4, optString3, "CUCC");
                        bf.c(null);
                        bf.d(null);
                        bf.a(-1);
                        if (bVar != null) {
                            bVar.a((cn.fly.verify.common.callback.b) verifyResult);
                        }
                    } catch (Throwable th3) {
                        VerifyException verifyException4 = new VerifyException(VerifyErr.INNER_OTHER_EXCEPTION_ERR.getCode(), ch.a(th3));
                        if (bVar != null) {
                            bVar.a(verifyException4);
                        }
                    }
                } catch (Throwable th4) {
                    VerifyException verifyException5 = new VerifyException(optInt, ch.a(th4));
                    if (bVar != null) {
                        bVar.a(verifyException5);
                    }
                }
            } catch (Throwable th5) {
                verifyException = new VerifyException(VerifyErr.INNER_OTHER_EXCEPTION_ERR.getCode(), ch.a(th5));
                if (bVar == null) {
                    return;
                }
                bVar.a(verifyException);
            }
        } catch (Throwable th6) {
            verifyException = new VerifyException(VerifyErr.INNER_OTHER_EXCEPTION_ERR.getCode(), ch.a(th6));
            if (bVar == null) {
            }
        }
    }
}