EMOTIBOT v3.0.0版本的 MD5 值为:e78ae62c08f0ada6738206eeb97d2940

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


package p.a.y.e.a.s.e.net;

import android.content.Context;
import android.net.wifi.WifiManager;
import android.util.Log;
import io.netty.handler.codec.dns.DefaultDnsRecordDecoder;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import org.json.JSONObject;

public class m11 {
    private static String[] lite_do = {"http://pv.sohu.com/cityjson", "http://pv.sohu.com/cityjson?ie=utf-8", "http://ip.chinaz.com/getip.aspx", "https://api.ip.sb/geoip"};

    public class a implements wx2<Object> {
        public final Context lite_do;

        public a(Context context) {
            this.lite_do = context;
        }

        @Override
        public void lite_do(vx2<Object> vx2Var) throws Exception {
            rt1.lite_else().lite_static("APP_IP", m11.lite_for(this.lite_do, 3));
        }
    }

    public static String lite_do(Context context) {
        WifiManager wifiManager = (WifiManager) context.getSystemService("wifi");
        if (!wifiManager.isWifiEnabled()) {
            wifiManager.setWifiEnabled(true);
        }
        return lite_int(wifiManager.getConnectionInfo().getIpAddress());
    }

    public static String lite_for(Context context, int i) {
        if (i >= lite_do.length) {
            return lite_do(context);
        }
        try {
            HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(lite_do[i]).openConnection();
            httpURLConnection.setRequestMethod(lb2.G);
            httpURLConnection.setReadTimeout(5000);
            httpURLConnection.setConnectTimeout(5000);
            httpURLConnection.setDoInput(true);
            httpURLConnection.setUseCaches(false);
            if (httpURLConnection.getResponseCode() == 200) {
                BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream(), "UTF-8"));
                StringBuilder sb = new StringBuilder();
                while (true) {
                    String readLine = bufferedReader.readLine();
                    if (readLine == null) {
                        break;
                    }
                    sb.append(readLine);
                }
                bufferedReader.close();
                httpURLConnection.disconnect();
                Log.e("xiaoman", sb.toString());
                if (i != 0 && i != 1) {
                    if (i == 2 || i == 3) {
                        return new JSONObject(sb.toString()).getString("ip");
                    }
                }
                return new JSONObject(sb.substring(sb.indexOf("{"), sb.indexOf(e4.lite_int) + 1)).getString("cip");
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return lite_for(context, i + 1);
    }

    public static void lite_if(Context context) {
        tx2.p0(new a(context)).G4(cc3.lite_for()).A4();
    }

    private static String lite_int(int i) {
        return (i & 255) + DefaultDnsRecordDecoder.ROOT + ((i >> 8) & 255) + DefaultDnsRecordDecoder.ROOT + ((i >> 16) & 255) + DefaultDnsRecordDecoder.ROOT + ((i >> 24) & 255);
    }
}