Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f
以下内容为反编译后的 AFc1rSDK.java 源代码,内容仅作参考
package com.appsflyer.internal;
import androidx.annotation.WorkerThread;
import androidx.browser.trusted.sharing.ShareTarget;
import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.internal.AFc1wSDK;
import e80.b0;
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;
@Metadata(d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0012\n\u0002\b\u0002\n\u0002\u0010$\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0010\u0000\b\u0000\u0018\u0000 \u00012\u00020\u0014:\u0001\u0001B/\u0012\u0006\u0010\u000f\u001a\u00020\u0002\u0012\u0014\u0010\u0010\u001a\u0010\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u0005\u0012\b\b\u0002\u0010\u0011\u001a\u00020\n¢\u0006\u0004\b\u0012\u0010\u0013J\u000f\u0010\t\u001a\u00020\rH\u0007¢\u0006\u0004\b\t\u0010\u000eR\u0012\u0010\u0003\u001a\u00020\u0002X\u0087\u0002¢\u0006\u0006\n\u0004\b\u0003\u0010\u0004R \u0010\t\u001a\u0010\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u0006\u0018\u00010\u0005X\u0087\u0002¢\u0006\u0006\n\u0004\b\u0007\u0010\bR\u0011\u0010\f\u001a\u00020\nX\u0007¢\u0006\u0006\n\u0004\b\t\u0010\u000b"}, d2 = {"Lcom/appsflyer/internal/AFc1rSDK;", "AFa1ySDK", "", "AFKeystoreWrapper", "[B", "", "", "AFInAppEventParameterName", "Ljava/util/Map;", "AFInAppEventType", "", "I", "valueOf", "", "()Z", "p0", "p1", "p2", "<init>", "([BLjava/util/Map;I)V", ""}, k = 1, mv = {1, 6, 0}, xi = 48)
public final class AFc1rSDK {
public static String valueOf = "https://%smonitorsdk.%s/remote-debug/exception-manager";
public Map<String, String> AFInAppEventType;
public int valueOf;
public byte[] AFKeystoreWrapper;
public AFc1rSDK(byte[] bArr, Map<String, String> map, int i11) {
kotlin.jvm.internal.s.j(bArr, "");
this.AFKeystoreWrapper = bArr;
this.AFInAppEventType = map;
this.valueOf = i11;
}
@WorkerThread
public final boolean AFInAppEventType() {
int i11;
URLConnection openConnection;
BufferedOutputStream bufferedOutputStream;
InputStream errorStream;
String str;
long currentTimeMillis = System.currentTimeMillis();
boolean z11 = false;
HttpURLConnection httpURLConnection = null;
try {
String format = String.format(valueOf, AppsFlyerLib.getInstance().getHostPrefix(), AFa1dSDK.valueOf().getHostName());
kotlin.jvm.internal.s.i(format, "");
kotlin.jvm.internal.s.j(format, "");
openConnection = new URL(format).openConnection();
} catch (Throwable th2) {
th = th2;
}
if (openConnection != null) {
HttpURLConnection httpURLConnection2 = (HttpURLConnection) openConnection;
try {
httpURLConnection2.setRequestMethod(ShareTarget.METHOD_POST);
StringBuilder sb2 = new StringBuilder();
sb2.append(httpURLConnection2.getRequestMethod());
sb2.append(':');
sb2.append(httpURLConnection2.getURL());
StringBuilder sb3 = new StringBuilder(sb2.toString());
sb3.append("\n length: ");
sb3.append(new String(this.AFKeystoreWrapper, a90.c.UTF_8).length());
Map<String, String> map = this.AFInAppEventType;
if (map != null) {
for (Map.Entry<String, String> entry : map.entrySet()) {
sb3.append("\n ");
sb3.append(entry.getKey());
sb3.append(": ");
sb3.append(entry.getValue());
}
}
StringBuilder sb4 = new StringBuilder("HTTP: [");
sb4.append(httpURLConnection2.hashCode());
sb4.append("] ");
sb4.append((Object) sb3);
String obj = sb4.toString();
kotlin.jvm.internal.s.j(obj, "");
AFLogger.afRDLog("[Exception Manager]: ".concat(String.valueOf(obj)));
httpURLConnection2.setInstanceFollowRedirects(false);
httpURLConnection2.setUseCaches(false);
httpURLConnection2.setReadTimeout(this.valueOf);
httpURLConnection2.setConnectTimeout(this.valueOf);
httpURLConnection2.addRequestProperty("Content-Type", "application/json");
Map<String, String> map2 = this.AFInAppEventType;
if (map2 != null) {
for (Map.Entry<String, String> entry2 : map2.entrySet()) {
httpURLConnection2.addRequestProperty(entry2.getKey(), entry2.getValue());
}
}
httpURLConnection2.setDoOutput(true);
httpURLConnection2.setRequestProperty("Content-Length", String.valueOf(this.AFKeystoreWrapper.length));
OutputStream outputStream = httpURLConnection2.getOutputStream();
kotlin.jvm.internal.s.i(outputStream, "");
if (outputStream instanceof BufferedOutputStream) {
bufferedOutputStream = (BufferedOutputStream) outputStream;
} else {
bufferedOutputStream = new BufferedOutputStream(outputStream, 8192);
}
bufferedOutputStream.write(this.AFKeystoreWrapper);
bufferedOutputStream.close();
if (AFc1wSDK.AFa1ySDK.AFKeystoreWrapper(httpURLConnection2)) {
errorStream = httpURLConnection2.getInputStream();
} else {
errorStream = httpURLConnection2.getErrorStream();
}
if (errorStream != null) {
kotlin.jvm.internal.s.i(errorStream, "");
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(errorStream, a90.c.UTF_8), 8192);
str = b0.C0(q80.n.e(bufferedReader), null, null, null, 0, null, null, 63, null);
bufferedReader.close();
}
str = "";
long currentTimeMillis2 = System.currentTimeMillis() - currentTimeMillis;
StringBuilder sb5 = new StringBuilder("response code:");
sb5.append(httpURLConnection2.getResponseCode());
sb5.append(' ');
sb5.append(httpURLConnection2.getResponseMessage());
sb5.append("\n\tbody:");
sb5.append(str);
sb5.append("\n\ttook ");
sb5.append(currentTimeMillis2);
sb5.append("ms");
String obj2 = sb5.toString();
StringBuilder sb6 = new StringBuilder("HTTP: [");
sb6.append(httpURLConnection2.hashCode());
sb6.append("] ");
sb6.append(obj2);
String obj3 = sb6.toString();
kotlin.jvm.internal.s.j(obj3, "");
AFLogger.afRDLog("[Exception Manager]: ".concat(String.valueOf(obj3)));
z11 = AFc1wSDK.AFa1ySDK.AFKeystoreWrapper(httpURLConnection2);
httpURLConnection2.disconnect();
} catch (Throwable th3) {
th = th3;
httpURLConnection = httpURLConnection2;
try {
long currentTimeMillis3 = System.currentTimeMillis() - currentTimeMillis;
StringBuilder sb7 = new StringBuilder("error: ");
sb7.append(th);
sb7.append("\n\ttook ");
sb7.append(currentTimeMillis3);
sb7.append("ms\n\t");
sb7.append(th.getMessage());
String obj4 = sb7.toString();
StringBuilder sb8 = new StringBuilder("HTTP: [");
if (httpURLConnection != null) {
i11 = httpURLConnection.hashCode();
} else {
i11 = 0;
}
sb8.append(i11);
sb8.append("] ");
sb8.append(obj4);
String obj5 = sb8.toString();
kotlin.jvm.internal.s.j(obj5, "");
AFLogger.afRDLog("[Exception Manager]: ".concat(String.valueOf(obj5)));
return z11;
} finally {
if (httpURLConnection != null) {
httpURLConnection.disconnect();
}
}
}
return z11;
}
throw new NullPointerException("null cannot be cast to non-null type java.net.HttpURLConnection");
}
}