Fortune Cow 5 v1.0.1版本的 MD5 值为:d91b686b83ccace3b5bac2f86518bd4a
以下内容为反编译后的 AFd1rSDK.java 源代码,内容仅作参考
package com.appsflyer.internal;
import android.util.Base64;
import com.appsflyer.AFLogger;
import java.security.MessageDigest;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.StringCompanionObject;
import kotlin.text.Charsets;
import kotlin.text.Regex;
import kotlin.text.StringsKt;
@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\b\b\u0016\u0018\u0000 \u00172\u00020\u0001:\u0001\u0017B\u0017\u0012\u0006\u0010\u0013\u001a\u00020\n\u0012\u0006\u0010\u0014\u001a\u00020\u000f¢\u0006\u0004\b\u0015\u0010\u0016R\u0013\u0010\u0005\u001a\u00020\u0002X\u0083\u0080\u0002¢\u0006\u0006\n\u0004\b\u0003\u0010\u0004R\u0013\u0010\u0007\u001a\u00020\u0002X\u0083\u0080\u0002¢\u0006\u0006\n\u0004\b\u0006\u0010\u0004R\u0011\u0010\b\u001a\u00020\u00028G¢\u0006\u0006\u001a\u0004\b\b\u0010\tR\u0014\u0010\u0006\u001a\u00020\n8\u0002X\u0083\u0004¢\u0006\u0006\n\u0004\b\u0005\u0010\u000bR\u0014\u0010\u000e\u001a\u00020\f8CX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u0005\u0010\rR\u0014\u0010\u0011\u001a\u00020\u000f8\u0002X\u0083\u0004¢\u0006\u0006\n\u0004\b\b\u0010\u0010R\u0011\u0010\u0012\u001a\u00020\u00028G¢\u0006\u0006\u001a\u0004\b\u0006\u0010\t"}, d2 = {"Lcom/appsflyer/internal/AFd1rSDK;", "", "", "afDebugLog", "Lkotlin/Lazy;", "AFKeystoreWrapper", "values", "AFInAppEventParameterName", "valueOf", "()Ljava/lang/String;", "Lcom/appsflyer/internal/AFc1tSDK;", "Lcom/appsflyer/internal/AFc1tSDK;", "", "()Z", "AFInAppEventType", "Lcom/appsflyer/internal/AFc1uSDK;", "Lcom/appsflyer/internal/AFc1uSDK;", "afInfoLog", "AFLogger", "p0", "p1", "<init>", "(Lcom/appsflyer/internal/AFc1tSDK;Lcom/appsflyer/internal/AFc1uSDK;)V", "AFa1xSDK"}, k = 1, mv = {1, 6, 0}, xi = 48)
public class AFd1rSDK {
private static AFd1oSDK afErrorLog;
private final AFc1tSDK AFKeystoreWrapper;
private final Lazy afDebugLog;
private final AFc1uSDK valueOf;
public final Lazy values;
public static final AFa1xSDK AFa1xSDK = new AFa1xSDK(null);
public static String AFInAppEventType = "https://%scdn-%ssettings.%s/android/v1/%s/settings";
public static String AFInAppEventParameterName = "https://%scdn-%stestsettings.%s/android/v1/%s/settings";
private static final List<String> afInfoLog = CollectionsKt.listOf((Object[]) new String[]{"googleplay", "playstore", "googleplaystore"});
public class AFa1ySDK {
public static final int[] AFKeystoreWrapper;
static {
int[] iArr = new int[AFd1lSDK.values().length];
iArr[AFd1lSDK.DEFAULT.ordinal()] = 1;
iArr[AFd1lSDK.API.ordinal()] = 2;
iArr[AFd1lSDK.RC.ordinal()] = 3;
AFKeystoreWrapper = iArr;
}
}
public static final void valueOf(AFd1oSDK aFd1oSDK) {
AFa1xSDK.values(aFd1oSDK);
}
public AFd1rSDK(AFc1tSDK aFc1tSDK, AFc1uSDK aFc1uSDK) {
Intrinsics.checkNotNullParameter(aFc1tSDK, "");
Intrinsics.checkNotNullParameter(aFc1uSDK, "");
this.AFKeystoreWrapper = aFc1tSDK;
this.valueOf = aFc1uSDK;
this.afDebugLog = LazyKt.lazy(new Function0<String>() {
{
super(0);
}
@Override
public final String invoke() {
String valueOf = AFa1cSDK.valueOf(AFd1rSDK.this.valueOf, AFd1rSDK.this.AFKeystoreWrapper.valueOf());
String str = valueOf;
if (!(str == null || StringsKt.isBlank(str))) {
String obj = StringsKt.trim((CharSequence) str).toString();
AFa1xSDK aFa1xSDK = AFd1rSDK.AFa1xSDK;
List<String> valueOf2 = AFa1xSDK.valueOf();
Locale locale = Locale.getDefault();
Intrinsics.checkNotNullExpressionValue(locale, "");
String lowerCase = obj.toLowerCase(locale);
Intrinsics.checkNotNullExpressionValue(lowerCase, "");
if (!valueOf2.contains(lowerCase)) {
valueOf = "-".concat(String.valueOf(obj));
} else {
StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
String format = String.format("AF detected using redundant Google-Play channel for attribution - %s. Using without channel postfix.", Arrays.copyOf(new Object[]{obj}, 1));
Intrinsics.checkNotNullExpressionValue(format, "");
AFLogger.afWarnLog(format);
valueOf = "";
}
}
return StringsKt.trim((CharSequence) (valueOf != null ? valueOf : "")).toString();
}
});
this.values = LazyKt.lazy(new Function0<String>() {
{
super(0);
}
@Override
public final String invoke() {
String packageName = AFd1rSDK.this.AFKeystoreWrapper.values.AFInAppEventType.getPackageName();
Intrinsics.checkNotNullExpressionValue(packageName, "");
return AFd1rSDK.valueOf(packageName, AFd1rSDK.AFInAppEventType(AFd1rSDK.this));
}
});
}
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010 \n\u0002\u0010\u000e\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0011\u0010\u0012R \u0010\b\u001a\b\u0012\u0004\u0012\u00020\u00030\u00028\u0007X\u0087\u0004¢\u0006\f\n\u0004\b\u0004\u0010\u0005\u001a\u0004\b\u0006\u0010\u0007R\u0012\u0010\n\u001a\u00020\u0003X\u0087\u0002¢\u0006\u0006\n\u0004\b\b\u0010\tR\u0012\u0010\u000b\u001a\u00020\u0003X\u0087\u0002¢\u0006\u0006\n\u0004\b\u000b\u0010\tR\u001c\u0010\u0010\u001a\u0004\u0018\u00010\f@\u0007X\u0087\n¢\u0006\f\n\u0004\b\r\u0010\u000e\"\u0004\b\n\u0010\u000f"}, d2 = {"Lcom/appsflyer/internal/AFd1rSDK$AFa1xSDK;", "", "", "", "afInfoLog", "Ljava/util/List;", "valueOf", "()Ljava/util/List;", "AFInAppEventType", "Ljava/lang/String;", "values", "AFInAppEventParameterName", "Lcom/appsflyer/internal/AFd1oSDK;", "afErrorLog", "Lcom/appsflyer/internal/AFd1oSDK;", "(Lcom/appsflyer/internal/AFd1oSDK;)V", "AFKeystoreWrapper", "<init>", "()V"}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class AFa1xSDK {
public AFa1xSDK(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private AFa1xSDK() {
}
public static List<String> valueOf() {
return AFd1rSDK.afInfoLog;
}
public static void values(AFd1oSDK aFd1oSDK) {
AFd1rSDK.afErrorLog = aFd1oSDK;
}
}
public static boolean AFKeystoreWrapper() {
return afErrorLog == null;
}
public final String values() {
AFd1lSDK aFd1lSDK;
if (AFKeystoreWrapper()) {
aFd1lSDK = AFd1lSDK.DEFAULT;
} else {
aFd1lSDK = AFd1lSDK.API;
}
int i = AFa1ySDK.AFKeystoreWrapper[aFd1lSDK.ordinal()];
if (i != 1) {
if (i != 2) {
if (i == 3) {
return "";
}
throw new NoWhenBranchMatchedException();
}
AFd1oSDK aFd1oSDK = afErrorLog;
String str = aFd1oSDK != null ? aFd1oSDK.AFKeystoreWrapper : null;
return str == null ? "" : str;
}
return (String) this.values.getValue();
}
public final String valueOf() {
AFd1lSDK aFd1lSDK;
if (AFKeystoreWrapper()) {
aFd1lSDK = AFd1lSDK.DEFAULT;
} else {
aFd1lSDK = AFd1lSDK.API;
}
int i = AFa1ySDK.AFKeystoreWrapper[aFd1lSDK.ordinal()];
if (i != 1) {
if (i != 2) {
if (i == 3) {
return "";
}
throw new NoWhenBranchMatchedException();
}
AFd1oSDK aFd1oSDK = afErrorLog;
String str = aFd1oSDK != null ? aFd1oSDK.valueOf : null;
return str == null ? "" : str;
}
return "appsflyersdk.com";
}
public static final String valueOf(String str, String str2) {
StringBuilder sb = new StringBuilder();
StringBuilder sb2 = new StringBuilder();
sb2.append(str);
sb2.append(str2);
String obj = sb2.toString();
Intrinsics.checkNotNullParameter(obj, "");
MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
byte[] bytes = obj.getBytes(Charsets.UTF_8);
Intrinsics.checkNotNullExpressionValue(bytes, "");
byte[] digest = messageDigest.digest(bytes);
Intrinsics.checkNotNullExpressionValue(digest, "");
String encodeToString = Base64.encodeToString(digest, 2);
Intrinsics.checkNotNullExpressionValue(encodeToString, "");
String lowerCase = encodeToString.toLowerCase(Locale.ROOT);
Intrinsics.checkNotNullExpressionValue(lowerCase, "");
String substring = new Regex("[^\\w]+").replace(lowerCase, "").substring(0, 6);
Intrinsics.checkNotNullExpressionValue(substring, "");
sb.append(substring);
sb.append('-');
return sb.toString();
}
public static final String AFInAppEventType(AFd1rSDK aFd1rSDK) {
return (String) aFd1rSDK.afDebugLog.getValue();
}
}