APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:漫漫瀂2
版本号:1.06.85
包名称:com.research.polemic.pharisaic

MD5 校验值:4dbca1eecd2fe1b6e4b14bca2547898a

反编译源代码说明

b.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package b.a.a.o;

import android.util.Log;
import android.util.Pair;
import java.net.Proxy;
import java.util.concurrent.TimeUnit;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

public class b extends Thread {
    public OkHttpClient u;
    public a v;
    public String n = "http://%s/api/user/get_config";
    public String[] t = {"dmu1.kanbuliao.com", "dmu2.kanbuliao.com", "dmu3.kanbuliao.com", "dmu4.kanbuliao.com", "dmu5.kanbuliao.com"};
    public int w = -1;

    public interface a {
        void a(boolean z);
    }

    public b(a aVar) {
        this.v = aVar;
    }

    public final OkHttpClient a() {
        if (this.u == null) {
            this.u = new OkHttpClient.Builder().writeTimeout(15L, TimeUnit.SECONDS).readTimeout(15L, TimeUnit.SECONDS).connectTimeout(15L, TimeUnit.SECONDS).retryOnConnectionFailure(true).proxy(Proxy.NO_PROXY).build();
        }
        return this.u;
    }

    public Pair<Boolean, String> b(String str) {
        try {
            Response execute = a().newCall(new Request.Builder().url(String.format(this.n, str)).get().build()).execute();
            if (execute == null) {
                return new Pair<>(Boolean.FALSE, "");
            }
            String string = execute.body().string();
            int code = execute.code();
            boolean isSuccessful = execute.isSuccessful();
            Log.d("HostChecked", "checked-->host:" + str + ",code:" + code + ",successful:" + isSuccessful + ",body:" + string + ",thread:" + Thread.currentThread().getName());
            if (string.contains(str)) {
                return new Pair<>(Boolean.FALSE, string);
            }
            if (isSuccessful) {
                return new Pair<>(Boolean.TRUE, "success");
            }
            return new Pair<>(Boolean.FALSE, string);
        } catch (Throwable th) {
            Log.e("HostChecked", "checkedThrowable-->ERROR:" + th.getMessage());
            return new Pair<>(Boolean.FALSE, th.getMessage());
        }
    }

    public final void c(boolean z) {
        a aVar = this.v;
        if (aVar != null) {
            this.v = null;
            aVar.a(z);
        }
    }

    public final void d() {
        int i = this.w + 1;
        this.w = i;
        String[] strArr = this.t;
        if (i >= strArr.length) {
            c(false);
            return;
        }
        String str = strArr[i];
        Log.d("HostChecked", "start-->index:" + this.w + ",host:" + str + ",thread:" + Thread.currentThread().getName());
        if (((Boolean) b(str).first).booleanValue()) {
            c.d().f(str);
            c(true);
        } else {
            d();
        }
    }

    @Override
    public void run() {
        super.run();
        d();
    }
}