导航菜单

页面标题

页面副标题

BAM Crawford v6.14.1 - d.java 源代码

正在查看: BAM Crawford v6.14.1 应用的 d.java JAVA 源代码文件

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


package m8;

import android.net.Uri;
import android.os.AsyncTask;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
import m8.h;
import okhttp3.OkHttpClient;

public class d {

    private final u8.a f12557a;

    private final z8.a f12558b;

    private final OkHttpClient f12559c;

    private final m8.a f12560d;

    private final j f12561e;

    private final String f12562f;

    private h f12563g;

    private final h.c f12564h;

    class a extends AsyncTask {
        a() {
        }

        @Override
        public Void doInBackground(Void... voidArr) {
            d dVar = d.this;
            dVar.f12563g = new h(dVar.g(), d.this.f12562f, d.this.f12564h);
            d.this.f12563g.f();
            return null;
        }
    }

    public d(u8.a aVar, String str, h.c cVar, z8.a aVar2) {
        this.f12557a = aVar;
        this.f12558b = aVar2;
        this.f12564h = cVar;
        OkHttpClient.Builder builder = new OkHttpClient.Builder();
        TimeUnit timeUnit = TimeUnit.MILLISECONDS;
        OkHttpClient build = builder.connectTimeout(5000L, timeUnit).readTimeout(0L, timeUnit).writeTimeout(0L, timeUnit).build();
        this.f12559c = build;
        this.f12560d = new m8.a(build);
        this.f12561e = new j(build);
        this.f12562f = str;
    }

    private String f() {
        return h(String.format(Locale.US, "android-%s-%s", this.f12562f, "android_id"));
    }

    public String g() {
        return String.format(Locale.US, "http://%s/inspector/device?name=%s&app=%s&device=%s", this.f12558b.a(), Uri.encode(x8.a.a()), Uri.encode(this.f12562f), Uri.encode(f()));
    }

    private static String h(String str) {
        try {
            MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
            messageDigest.reset();
            try {
                byte[] digest = messageDigest.digest(str.getBytes("UTF-8"));
                return String.format("%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", Byte.valueOf(digest[0]), Byte.valueOf(digest[1]), Byte.valueOf(digest[2]), Byte.valueOf(digest[3]), Byte.valueOf(digest[4]), Byte.valueOf(digest[5]), Byte.valueOf(digest[6]), Byte.valueOf(digest[7]), Byte.valueOf(digest[8]), Byte.valueOf(digest[9]), Byte.valueOf(digest[10]), Byte.valueOf(digest[11]), Byte.valueOf(digest[12]), Byte.valueOf(digest[13]), Byte.valueOf(digest[14]), Byte.valueOf(digest[15]), Byte.valueOf(digest[16]), Byte.valueOf(digest[17]), Byte.valueOf(digest[18]), Byte.valueOf(digest[19]));
            } catch (UnsupportedEncodingException e10) {
                throw new AssertionError("This environment doesn't support UTF-8 encoding", e10);
            }
        } catch (NoSuchAlgorithmException e11) {
            throw new AssertionError("Could not get standard SHA-256 algorithm", e11);
        }
    }

    public void i() {
        if (this.f12563g != null) {
            q5.a.H("ReactNative", "Inspector connection already open, nooping.");
        } else {
            new a().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Void[0]);
        }
    }
}