导航菜单

页面标题

页面副标题

95爱播免登录版 v3.1.9 - b.java 源代码

正在查看: 95爱播免登录版 v3.1.9 应用的 b.java JAVA 源代码文件

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


package com.mobile.auth.ao;

import android.content.Context;
import android.net.Network;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.mobile.auth.ao.a;
import com.mobile.auth.ap.a;
import com.mobile.auth.ap.e;
import com.mobile.auth.ap.f;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.HashMap;
import org.json.JSONObject;

public class b {
    private static volatile b a;
    private Handler b = new Handler(Looper.getMainLooper());
    private a c = new a();

    private b() {
    }

    public static b a() {
        try {
            if (a == null) {
                synchronized (b.class) {
                    if (a == null) {
                        a = new b();
                    }
                }
            }
            return a;
        } catch (Throwable th) {
            com.mobile.auth.gatewayauth.a.a(th);
            return null;
        }
    }

    private String a(Context context, int i2, String str) {
        try {
            try {
                String packageName = context.getPackageName();
                String b = f.b(context, context.getPackageName());
                if (packageName == null) {
                    packageName = "";
                }
                if (b == null) {
                    b = "";
                }
                String a2 = e.a();
                String str2 = i2 != 2 ? "1" : "";
                String str3 = "" + System.currentTimeMillis();
                String a3 = com.mobile.auth.am.b.a(f.c(context).getBytes());
                String decode = URLDecoder.decode(f.d(str), "utf-8");
                String str4 = str2 + a2 + "30100jsonp" + a3 + decode + packageName + b + str3 + "4.3.1AR02B0615" + e.b();
                com.mobile.auth.ap.d.a("unsign:" + str4);
                String a4 = f.a(str4);
                JSONObject jSONObject = new JSONObject();
                jSONObject.put("client_id", a2);
                jSONObject.put("client_type", "30100");
                jSONObject.put("format", "jsonp");
                jSONObject.put("version", "4.3.1AR02B0615");
                if (i2 != 2) {
                    jSONObject.put("business_type", str2);
                }
                jSONObject.put("packname", packageName);
                jSONObject.put("packsign", URLEncoder.encode(b, "utf-8"));
                jSONObject.put("timeStamp", str3);
                jSONObject.put("key", decode);
                jSONObject.put("fp", a3);
                jSONObject.put("sign", a4);
                return jSONObject.toString();
            } catch (Exception e2) {
                com.mobile.auth.ap.d.b("getPreCheckParam error:" + e2.getMessage());
                return "";
            }
        } catch (Throwable th) {
            com.mobile.auth.gatewayauth.a.a(th);
            return null;
        }
    }

    private HashMap<String, String> a(Context context) {
        try {
            HashMap<String, String> hashMap = new HashMap<>();
            hashMap.put("model", Build.MODEL);
            hashMap.put("system", Build.VERSION.RELEASE);
            hashMap.put(PushConstants.DEVICE_ID, f.e(context));
            com.mobile.auth.ap.d.a(hashMap.toString());
            return hashMap;
        } catch (Throwable th) {
            com.mobile.auth.gatewayauth.a.a(th);
            return null;
        }
    }

    private void a(Context context, int i2, String str, String str2, Network network, final c cVar) {
        try {
            try {
                String str3 = str2 + com.mobile.auth.ap.b.a(a(context, i2, str), "&");
                com.mobile.auth.ap.d.c(str3);
                this.c.a(str3, a(context), network, new a.InterfaceC0011a() {
                    @Override
                    public void a(String str4) {
                        try {
                            com.mobile.auth.ap.d.c("precheck:" + str4);
                            com.mobile.auth.ap.a.a().b();
                            if (TextUtils.isEmpty(str4)) {
                                cVar.a(2, "");
                            } else {
                                cVar.a(1, str4);
                            }
                        } catch (Throwable th) {
                            com.mobile.auth.gatewayauth.a.a(th);
                        }
                    }
                });
            } catch (Exception unused) {
                cVar.a(2, "");
                com.mobile.auth.ap.a.a().b();
            }
        } catch (Throwable th) {
            com.mobile.auth.gatewayauth.a.a(th);
        }
    }

    static void a(b bVar, Context context, int i2, String str, String str2, Network network, c cVar) {
        try {
            bVar.a(context, i2, str, str2, network, cVar);
        } catch (Throwable th) {
            com.mobile.auth.gatewayauth.a.a(th);
        }
    }

    public void a(final Context context, final int i2, final String str, final c cVar) {
        try {
            try {
                com.mobile.auth.ap.d.c("onlinetype:" + f.a(context.getApplicationContext()));
                if (f.a(context.getApplicationContext()) == 1) {
                    this.b.post(new Runnable() {
                        @Override
                        public void run() {
                            try {
                                com.mobile.auth.ap.a.a().a(context, "https://opencloud.wostore.cn/openapi/netauth/precheck/wp?", new a.b() {
                                    @Override
                                    public void a(boolean z, Network network) {
                                        try {
                                            com.mobile.auth.ap.d.c("fcmobile:" + z);
                                            if (z) {
                                                AnonymousClass2 anonymousClass2 = AnonymousClass2.this;
                                                b.a(b.this, context, i2, str, "https://opencloud.wostore.cn/openapi/netauth/precheck/wp?", network, cVar);
                                            } else {
                                                cVar.a(2, "获取鉴权信息失败");
                                                com.mobile.auth.ap.a.a().b();
                                            }
                                        } catch (Throwable th) {
                                            com.mobile.auth.gatewayauth.a.a(th);
                                        }
                                    }
                                });
                            } catch (Throwable th) {
                                com.mobile.auth.gatewayauth.a.a(th);
                            }
                        }
                    });
                } else if (f.a(context.getApplicationContext()) == 0) {
                    a(context, i2, str, "https://opencloud.wostore.cn/openapi/netauth/precheck/wp?", null, cVar);
                } else {
                    cVar.a(2, "获取鉴权信息失败");
                    com.mobile.auth.ap.a.a().b();
                }
            } catch (Exception unused) {
                cVar.a(2, "");
                com.mobile.auth.ap.a.a().b();
            }
        } catch (Throwable th) {
            com.mobile.auth.gatewayauth.a.a(th);
        }
    }

    public void a(Context context, String str) {
        try {
            this.c.a("https://unilog.wostore.cn:18080/logserver/account/sdknopasswd", str, new a.InterfaceC0011a() {
                @Override
                public void a(String str2) {
                    try {
                        com.mobile.auth.ap.d.a(str2);
                    } catch (Throwable th) {
                        com.mobile.auth.gatewayauth.a.a(th);
                    }
                }
            });
        } catch (Exception unused) {
        } catch (Throwable th) {
            com.mobile.auth.gatewayauth.a.a(th);
        }
    }
}