调研通 v3.0.3版本的 MD5 值为:fe075d21227d488bdb9f6aa09d3b3f35

以下内容为反编译后的 x.java 源代码,内容仅作参考


package ct;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import java.net.InetSocketAddress;
import java.net.Proxy;

public class x {

    private static final String f12436a = "x";

    private static String f12437b = "cmwap";

    private static String f12438c = "3gwap";

    private static String f12439d = "uniwap";

    private static String f12440e = "ctwap";

    public static String f12441f = "nonetwork";
    private static String g = "wifi";
    private static Context h = null;
    private static volatile boolean i = true;
    public static String j = "";
    private static String k = "";
    public static String l = "";
    private static volatile int m = 0;
    private static int n = 0;
    public static volatile boolean o = false;
    private static String p = "";

    public static synchronized String a() {
        StringBuilder sb;
        String sb2;
        synchronized (x.class) {
            int i2 = m;
            if (i2 == 1) {
                sb = new StringBuilder("ssid_");
                sb.append(k);
                sb.append(l);
            } else if (i2 == 2 || i2 == 3) {
                sb = new StringBuilder("apn_");
                sb.append(j);
            } else if (i2 != 4) {
                sb2 = "unknown";
            } else {
                sb = new StringBuilder("4Gapn_");
                sb.append(j);
            }
            sb2 = sb.toString();
        }
        return sb2;
    }

    public static void b(Context context) {
        try {
            h = context;
            d();
            j();
        } catch (Throwable unused) {
        }
    }

    public static synchronized boolean c(Integer num) {
        synchronized (x.class) {
            if (num.intValue() != 1 && num.intValue() != 2) {
                if (num.intValue() != 3) {
                    return false;
                }
            }
            return true;
        }
    }

    public static synchronized void d() {
        synchronized (x.class) {
            try {
                y.b();
                NetworkInfo activeNetworkInfo = ((ConnectivityManager) h.getSystemService("connectivity")).getActiveNetworkInfo();
                if (activeNetworkInfo == null) {
                    j = "";
                    m = 0;
                    o = false;
                    p = "";
                    i = false;
                    j = f12441f;
                    return;
                }
                if (activeNetworkInfo.isAvailable() && activeNetworkInfo.isConnected()) {
                    i = true;
                } else {
                    i = false;
                    j = f12441f;
                }
                int type = activeNetworkInfo.getType();
                if (type == 1) {
                    m = 1;
                    o = false;
                    p = "";
                    WifiInfo connectionInfo = ((WifiManager) h.getSystemService("wifi")).getConnectionInfo();
                    k = connectionInfo.getSSID();
                    l = connectionInfo.getBSSID();
                    j = g;
                    return;
                }
                String extraInfo = activeNetworkInfo.getExtraInfo();
                if (extraInfo == null) {
                    j = "";
                    m = 0;
                    o = false;
                    p = "";
                    return;
                }
                j = extraInfo.trim().toLowerCase();
                if (type == 0) {
                    int subtype = activeNetworkInfo.getSubtype();
                    if (subtype != 1 && subtype != 2 && subtype != 4) {
                        if (subtype == 13) {
                            m = 4;
                        } else {
                            m = 3;
                        }
                    }
                    m = 2;
                }
                n = k().intValue();
                if (j.contains(f12438c)) {
                    o = true;
                    p = "10.0.0.172";
                    return;
                }
                if (j.contains(f12437b)) {
                    o = true;
                    p = "10.0.0.172";
                } else if (j.contains(f12439d)) {
                    o = true;
                    p = "10.0.0.172";
                } else if (j.contains(f12440e)) {
                    o = true;
                    p = "10.0.0.200";
                } else {
                    o = false;
                    p = "";
                }
            } catch (Throwable th) {
                th.printStackTrace();
            }
        }
    }

    public static synchronized int e() {
        int i2;
        synchronized (x.class) {
            i2 = m;
        }
        return i2;
    }

    public static synchronized int f() {
        int i2;
        synchronized (x.class) {
            i2 = n;
        }
        return i2;
    }

    public static boolean g() {
        return i;
    }

    public static boolean h() {
        return m == 1;
    }

    public static Proxy i() {
        if (!o || TextUtils.isEmpty(p)) {
            return null;
        }
        return new Proxy(Proxy.Type.HTTP, new InetSocketAddress(p, 80));
    }

    private static synchronized void j() {
        synchronized (x.class) {
            String str = "showApnInfo... Apn:" + j + ",sIsNetworkOk:" + i + ",sNetType:" + m + ",sIsProxy:" + o + ",sProxyAddress:" + p;
            y.b();
        }
    }

    private static synchronized Integer k() {
        Integer num;
        int intValue;
        Integer valueOf;
        Integer num2;
        synchronized (x.class) {
            int i2 = 3;
            int i3 = 2;
            if (m == 1) {
                String str = k;
                if (str != null && str.length() > 0) {
                    String lowerCase = str.toLowerCase();
                    boolean contains = lowerCase.contains("cmcc");
                    if (!lowerCase.contains("chinanet")) {
                        i2 = contains ? 1 : 0;
                    }
                    if (!lowerCase.contains("chinaunicom")) {
                        i3 = i2;
                    }
                    num2 = Integer.valueOf(i3);
                    intValue = num2.intValue();
                }
                num2 = 0;
                intValue = num2.intValue();
            } else {
                if (m != 2 && m != 3) {
                    n = 0;
                    valueOf = Integer.valueOf(n);
                }
                Context context = h;
                String str2 = j;
                TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService("phone");
                if (telephonyManager != null && telephonyManager.getSimState() == 5) {
                    String simOperator = telephonyManager.getSimOperator();
                    if (simOperator.length() > 0) {
                        if (!simOperator.equals("46000") && !simOperator.equals("46002")) {
                            if (!simOperator.equals("46001")) {
                            }
                            num = 2;
                            intValue = num.intValue();
                        }
                        num = 1;
                        intValue = num.intValue();
                    }
                }
                if (str2 != null) {
                    String lowerCase2 = str2.toLowerCase();
                    if (!lowerCase2.contains("cmnet") && !lowerCase2.contains("cmwap")) {
                        if (!lowerCase2.contains("uninet") && !lowerCase2.contains("uniwap") && !lowerCase2.contains("3gnet") && !lowerCase2.contains("3gwap")) {
                            if (!lowerCase2.contains("ctnet")) {
                                if (lowerCase2.contains("ctwap")) {
                                }
                            }
                            num = 3;
                            intValue = num.intValue();
                        }
                        num = 2;
                        intValue = num.intValue();
                    }
                    num = 1;
                    intValue = num.intValue();
                }
                num = 0;
                intValue = num.intValue();
            }
            n = intValue;
            valueOf = Integer.valueOf(n);
        }
        return valueOf;
    }
}