导航菜单

页面标题

页面副标题

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

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

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


package com.mobile.auth.k;

import android.content.Context;
import android.net.Network;
import android.net.NetworkInfo;
import android.os.Build;
import android.os.Bundle;
import android.os.SystemClock;
import android.text.TextUtils;
import com.mobile.auth.g.c;
import com.mobile.auth.k.b;
import com.sina.weibo.sdk.statistic.LogBuilder;
import com.tencent.connect.common.Constants;
import java.net.HttpURLConnection;
import javax.net.ssl.HttpsURLConnection;
import org.apache.log4j.spi.LocationInfo;
import org.jivesoftware.smackx.Form;
import org.json.JSONException;
import org.json.JSONObject;

public class e {
    private Network a;
    private String b;
    private String c = "";
    private int d = 1;

    private String f1393e = null;

    private Bundle f1394f;

    public interface a {
        void a(String str, String str2);

        void a(String str, String str2, String str3);
    }

    private void a(com.mobile.auth.g.c cVar, Bundle bundle) {
        String a2 = z.a(true);
        String a3 = z.a(true, "1".equals(bundle.getString("operatorType", "")));
        bundle.putString("ipv4_list", a2);
        bundle.putString("ipv6_list", a3);
        c.a b = cVar.b();
        if (!bundle.getBoolean("isCloseIpv4", false)) {
            b.a(a2);
        }
        if (!bundle.getBoolean("isCloseIpv6", false)) {
            b.b(a3);
        }
        b.v(b.w(bundle.getString(LogBuilder.KEY_APPKEY)));
        cVar.a(b);
    }

    private void a(String str, int i2, a aVar, HttpURLConnection httpURLConnection, Network network, String str2, String str3, String str4) {
        String str5;
        String str6;
        String str7;
        Bundle bundle;
        String str8;
        String str9;
        String str10;
        String str11 = str;
        try {
            if (i2 == 302 || i2 == 301) {
                String string = this.f1394f.getString("interfacecode", "");
                this.f1394f.putString("interfacecode", string + i2 + ";");
                String headerField = httpURLConnection.getHeaderField("Location");
                g.b("HttpUtils", "Location head =" + headerField);
                if (this.f1393e == null) {
                    this.f1393e = httpURLConnection.getHeaderField("pplocation");
                }
                if (!TextUtils.isEmpty(headerField) && this.f1393e != null) {
                    String string2 = this.f1394f.getString("interfacetype", "");
                    if ("2".equals(this.f1394f.getString("operatorType", "0"))) {
                        bundle = this.f1394f;
                        str8 = string2 + "getUnicomMobile;";
                    } else {
                        bundle = this.f1394f;
                        str8 = string2 + "getTelecomMobile;";
                    }
                    bundle.putString("interfacetype", str8);
                    a(headerField, "", aVar, network, Constants.HTTP_POST);
                    return;
                }
                str5 = "200021";
                str6 = "数据解析异常";
                str7 = this.c;
            } else {
                if (i2 != 200) {
                    g.a("HttpUtils", "http response code is not 200 ---" + i2);
                    int i3 = this.d + 1;
                    this.d = i3;
                    if (i3 > 3 || (j.a(this.b) && !str3.contains("logReport"))) {
                        if (i2 != 0) {
                            if (i2 == Integer.valueOf("200050").intValue()) {
                                aVar.a("200050", "EOF异常", this.c);
                                return;
                            }
                            if (i2 == Integer.valueOf("200072").intValue()) {
                                aVar.a("200072", "ca根证书校验失败", this.c);
                                return;
                            }
                            if (i2 != Integer.valueOf("102507").intValue()) {
                                aVar.a("200028", TextUtils.isEmpty(str) ? "网络异常" : str11, this.c);
                                return;
                            }
                            aVar.a(i2 + "", str11, this.c);
                            return;
                        }
                        str5 = i2 + "";
                        str6 = "请求出错";
                        str7 = this.c;
                    }
                    a(str3, str2, aVar, network, str4);
                    return;
                }
                if (TextUtils.isEmpty(this.f1393e)) {
                    aVar.a(str11, this.c);
                    return;
                }
                try {
                    g.c("HttpUtils", "异网取号结果 = " + str11);
                    JSONObject jSONObject = new JSONObject(str11);
                    String optString = jSONObject.optString(Form.TYPE_RESULT, "0");
                    String string3 = this.f1394f.getString("interfacecode", "");
                    this.f1394f.putString("interfacecode", string3 + optString + ";");
                    if (TextUtils.isEmpty(jSONObject.getString(Form.TYPE_RESULT)) || !"0".equals(jSONObject.getString(Form.TYPE_RESULT))) {
                        str9 = "取号接口失败";
                        str10 = "200039";
                        try {
                            aVar.a(str10, str9, this.c);
                        } catch (JSONException e2) {
                            e = e2;
                            com.mobile.auth.j.a.a.add(e);
                            aVar.a(str10, str9, this.c);
                            return;
                        }
                    } else {
                        g.c("HttpUtils", "pplocation=" + this.f1393e);
                        String str12 = this.f1393e;
                        String substring = str12.substring(str12.indexOf(LocationInfo.NA) + 1);
                        JSONObject jSONObject2 = new JSONObject();
                        jSONObject2.put(substring.split("=")[0], substring.split("=")[1]);
                        jSONObject2.put("data", str11);
                        String str13 = this.f1393e;
                        this.f1393e = str13.substring(1, str13.lastIndexOf(LocationInfo.NA));
                        String str14 = "http://onekey.cmpassport.com/unisdk/" + this.f1393e;
                        String string4 = this.f1394f.getString("interfacetype", "");
                        this.f1394f.putString("interfacetype", string4 + "getNewTelecomPhoneNumberNotify;");
                        this.f1393e = null;
                        g.c("HttpUtils", "location" + str14);
                        a(str14, jSONObject2.toString(), aVar, network, Constants.HTTP_POST);
                    }
                    return;
                } catch (JSONException e3) {
                    e = e3;
                    str9 = "取号接口失败";
                    str10 = "200039";
                }
            }
            aVar.a(str5, str6, str7);
        } catch (Exception e4) {
            com.mobile.auth.j.a.a.add(e4);
            if (TextUtils.isEmpty(str)) {
                str11 = "网络异常";
            }
            aVar.a("200028", str11, this.c);
        }
    }

    private <T extends com.mobile.auth.g.f> void a(String str, T t, a aVar, String str2) {
        String str3;
        String jSONObject;
        Network network;
        g.b("HttpUtils", "in  wifiNetwork");
        b a2 = b.a((Context) null);
        int i2 = 0;
        if (Build.VERSION.SDK_INT >= 21) {
            this.a = null;
            a2.a(new b.a() {
                @Override
                public void a(Network network2) {
                    e.this.a = network2;
                    g.b("HttpUtils", "onAvailable");
                }
            });
            while (this.a == null) {
                i2++;
                SystemClock.sleep(50L);
                g.b("HttpUtils", "waiting for newtwork");
                if (i2 > 60) {
                    aVar.a("200024", "数据网络切换失败", this.c);
                    return;
                }
            }
            this.c = w.a();
            if (str.contains("getPrePhonescrip")) {
                a((com.mobile.auth.g.c) t, this.f1394f);
            }
            jSONObject = t.a().toString();
            network = this.a;
            a(str, jSONObject, aVar, network, str2);
        }
        b.a.startUsingNetworkFeature(0, "enableHIPRI");
        while (i2 < 30) {
            try {
                if (b.a.getNetworkInfo(5).getState().compareTo(NetworkInfo.State.CONNECTED) == 0) {
                    break;
                }
                SystemClock.sleep(1000L);
                i2++;
            } catch (Exception e2) {
                com.mobile.auth.j.a.a.add(e2);
                str3 = "check hipri failed";
            }
        }
        boolean requestRouteToHost = b.a.requestRouteToHost(5, b.a(b.b(str)));
        g.a("HttpUtils", "切换数据网络结果 >>> " + requestRouteToHost);
        if (!requestRouteToHost) {
            str3 = "切换网络失败or无数据网络";
            g.a("HttpUtils", str3);
            aVar.a("200024", "数据网络切换失败", this.c);
            return;
        }
        g.a("HttpUtils", "切换网络成功");
        this.c = w.a();
        if (str.contains("getPrePhonescrip")) {
            a((com.mobile.auth.g.c) t, this.f1394f);
        }
        jSONObject = t.a().toString();
        network = null;
        a(str, jSONObject, aVar, network, str2);
    }

    private void a(java.lang.String r18, java.lang.String r19, com.mobile.auth.k.e.a r20, android.net.Network r21, java.lang.String r22) {
        throw new UnsupportedOperationException("Method not decompiled: com.mobile.auth.k.e.a(java.lang.String, java.lang.String, com.mobile.auth.k.e$a, android.net.Network, java.lang.String):void");
    }

    private static void a(HttpsURLConnection httpsURLConnection, Bundle bundle, String str) {
        if (bundle.getBoolean("CLOSE_CERT_VERIFY", true) || str.contains("https://config.cmpassport.com/client/uniConfig")) {
            return;
        }
        httpsURLConnection.setSSLSocketFactory(new com.mobile.auth.i.a(bundle).a().getSocketFactory());
    }

    public <T extends com.mobile.auth.g.f> void a(String str, T t, boolean z, a aVar, String str2, String str3, Bundle bundle) {
        this.f1394f = bundle;
        this.b = str3;
        if (!j.a(str3) || str.contains("logReport") || str.contains("Config")) {
            g.c("HttpUtils", "使用wifi下取号???????" + z);
            if (z) {
                a(str, t, aVar, str2);
                return;
            }
            if (str.contains("getPrePhonescrip")) {
                a((com.mobile.auth.g.c) t, bundle);
            }
            a(str, t.a().toString(), aVar, null, str2);
        }
    }
}