导航菜单

页面标题

页面副标题

VivaMoneda v1.4 - AFd1gSDK.java 源代码

正在查看: VivaMoneda v1.4 应用的 AFd1gSDK.java JAVA 源代码文件

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


package com.appsflyer.internal;

import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerLib;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Charsets;
import me.jessyan.autosize.BuildConfig;
import org.jetbrains.annotations.NotNull;

@Metadata
public final class AFd1gSDK {
    public Map<String, String> AFInAppEventParameterName;

    @NotNull
    public byte[] AFInAppEventType;
    public int valueOf;

    @NotNull
    public static final AFa1vSDK AFa1vSDK = new AFa1vSDK(null);

    @NotNull
    public static String AFKeystoreWrapper = "https://%smonitorsdk.%s/remote-debug/exception-manager";

    @Metadata
    public static final class AFa1vSDK {
        private AFa1vSDK() {
        }

        public AFa1vSDK(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }
    }

    public AFd1gSDK(@NotNull byte[] bArr, Map<String, String> map, int i9) {
        Intrinsics.checkNotNullParameter(bArr, "");
        this.AFInAppEventType = bArr;
        this.AFInAppEventParameterName = map;
        this.valueOf = i9;
    }

    private final boolean AFInAppEventType(HttpURLConnection httpURLConnection, long j9) {
        String str;
        httpURLConnection.setRequestMethod("POST");
        StringBuilder sb = new StringBuilder();
        sb.append(httpURLConnection.getRequestMethod());
        sb.append(':');
        sb.append(httpURLConnection.getURL());
        StringBuilder sb2 = new StringBuilder(sb.toString());
        sb2.append("\n length: ");
        sb2.append(new String(this.AFInAppEventType, Charsets.UTF_8).length());
        Map<String, String> map = this.AFInAppEventParameterName;
        if (map != null) {
            for (Map.Entry<String, String> entry : map.entrySet()) {
                sb2.append("\n ");
                sb2.append(entry.getKey());
                sb2.append(": ");
                sb2.append(entry.getValue());
            }
        }
        StringBuilder sb3 = new StringBuilder("HTTP: [");
        sb3.append(httpURLConnection.hashCode());
        sb3.append("] ");
        sb3.append((Object) sb2);
        String obj = sb3.toString();
        Intrinsics.checkNotNullParameter(obj, "");
        AFLogger.afRDLog("[Exception Manager]: ".concat(String.valueOf(obj)));
        httpURLConnection.setInstanceFollowRedirects(false);
        httpURLConnection.setUseCaches(false);
        httpURLConnection.setReadTimeout(this.valueOf);
        httpURLConnection.setConnectTimeout(this.valueOf);
        httpURLConnection.addRequestProperty("Content-Type", "application/json");
        Map<String, String> map2 = this.AFInAppEventParameterName;
        if (map2 != null) {
            for (Map.Entry<String, String> entry2 : map2.entrySet()) {
                httpURLConnection.addRequestProperty(entry2.getKey(), entry2.getValue());
            }
        }
        httpURLConnection.setDoOutput(true);
        httpURLConnection.setRequestProperty("Content-Length", String.valueOf(this.AFInAppEventType.length));
        OutputStream outputStream = httpURLConnection.getOutputStream();
        Intrinsics.checkNotNullExpressionValue(outputStream, "");
        BufferedOutputStream bufferedOutputStream = outputStream instanceof BufferedOutputStream ? (BufferedOutputStream) outputStream : new BufferedOutputStream(outputStream, 8192);
        bufferedOutputStream.write(this.AFInAppEventType);
        bufferedOutputStream.close();
        InputStream inputStream = AFd1hSDK.AFKeystoreWrapper(httpURLConnection) ? httpURLConnection.getInputStream() : httpURLConnection.getErrorStream();
        if (inputStream != null) {
            Intrinsics.checkNotNullExpressionValue(inputStream, "");
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, Charsets.UTF_8), 8192);
            str = kotlin.collections.x.I(kotlin.io.i.e(bufferedReader), null, null, null, 0, null, null, 63, null);
            bufferedReader.close();
        }
        str = BuildConfig.FLAVOR;
        long currentTimeMillis = System.currentTimeMillis() - j9;
        StringBuilder sb4 = new StringBuilder("response code:");
        sb4.append(httpURLConnection.getResponseCode());
        sb4.append(' ');
        sb4.append(httpURLConnection.getResponseMessage());
        sb4.append("\n\tbody:");
        sb4.append(str);
        sb4.append("\n\ttook ");
        sb4.append(currentTimeMillis);
        sb4.append("ms");
        String obj2 = sb4.toString();
        StringBuilder sb5 = new StringBuilder("HTTP: [");
        sb5.append(httpURLConnection.hashCode());
        sb5.append("] ");
        sb5.append(obj2);
        String obj3 = sb5.toString();
        Intrinsics.checkNotNullParameter(obj3, "");
        AFLogger.afRDLog("[Exception Manager]: ".concat(String.valueOf(obj3)));
        return AFd1hSDK.AFKeystoreWrapper(httpURLConnection);
    }

    public final boolean values() {
        HttpURLConnection httpURLConnection;
        Throwable th;
        URLConnection openConnection;
        long currentTimeMillis = System.currentTimeMillis();
        boolean z8 = false;
        try {
            String format = String.format(AFKeystoreWrapper, AppsFlyerLib.getInstance().getHostPrefix(), AFb1tSDK.AFKeystoreWrapper().getHostName());
            Intrinsics.checkNotNullExpressionValue(format, "");
            Intrinsics.checkNotNullParameter(format, "");
            openConnection = new URL(format).openConnection();
        } catch (Throwable th2) {
            httpURLConnection = null;
            th = th2;
        }
        if (openConnection == null) {
            throw new NullPointerException("null cannot be cast to non-null type java.net.HttpURLConnection");
        }
        httpURLConnection = (HttpURLConnection) openConnection;
        try {
            z8 = AFInAppEventType(httpURLConnection, currentTimeMillis);
        } catch (Throwable th3) {
            th = th3;
            try {
                long currentTimeMillis2 = System.currentTimeMillis() - currentTimeMillis;
                StringBuilder sb = new StringBuilder("error: ");
                sb.append(th);
                sb.append("\n\ttook ");
                sb.append(currentTimeMillis2);
                sb.append("ms\n\t");
                sb.append(th.getMessage());
                String obj = sb.toString();
                StringBuilder sb2 = new StringBuilder("HTTP: [");
                sb2.append(httpURLConnection != null ? httpURLConnection.hashCode() : 0);
                sb2.append("] ");
                sb2.append(obj);
                String obj2 = sb2.toString();
                Intrinsics.checkNotNullParameter(obj2, "");
                AFLogger.afRDLog("[Exception Manager]: ".concat(String.valueOf(obj2)));
            } catch (Throwable th4) {
                if (httpURLConnection != null) {
                    httpURLConnection.disconnect();
                }
                throw th4;
            }
        }
        httpURLConnection.disconnect();
        return z8;
    }
}