Driving Zone: Germany v1.22.4版本的 MD5 值为:2b6e2d8e8733a3104dcc306c5770286c
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.appodeal.ads.modules.libs.network.endpoint;
import com.appodeal.ads.modules.common.internal.ext.ByteArrayExtKt;
import com.appodeal.ads.modules.libs.network.AppodealEndpoint;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedList;
import java.util.Locale;
import java.util.Set;
import kotlin.collections.CollectionsKt;
import kotlin.collections.SetsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Charsets;
public final class a implements AppodealEndpoint {
public final LinkedList f2253a = new LinkedList();
public String b = "https://a.appbaqend.com";
@Override
public final String getActiveEndpoint() {
String str = (String) this.f2253a.peek();
return str == null ? this.b : str;
}
@Override
public final void init(String defaultBaseUrl, Set<String> loadedUrls) {
Intrinsics.checkNotNullParameter(defaultBaseUrl, "defaultBaseUrl");
Intrinsics.checkNotNullParameter(loadedUrls, "loadedUrls");
this.b = defaultBaseUrl;
Date date = new Date();
ArrayList arrayList = new ArrayList();
Locale locale = Locale.ENGLISH;
String year = new SimpleDateFormat("yyyy", locale).format(date);
String month = new SimpleDateFormat("yyyyMM", locale).format(date);
String week = new SimpleDateFormat("yyyyMMww", locale).format(date);
StringBuilder sb = new StringBuilder();
sb.append("https://a.");
Intrinsics.checkNotNullExpressionValue(year, "year");
sb.append(a(year));
sb.append(".com");
arrayList.add(sb.toString());
StringBuilder sb2 = new StringBuilder();
sb2.append("https://a.");
Intrinsics.checkNotNullExpressionValue(month, "month");
sb2.append(a(month));
sb2.append(".com");
arrayList.add(sb2.toString());
StringBuilder sb3 = new StringBuilder();
sb3.append("https://a.");
Intrinsics.checkNotNullExpressionValue(week, "week");
sb3.append(a(week));
sb3.append(".com");
arrayList.add(sb3.toString());
Set plus = SetsKt.plus((Set) loadedUrls, (Iterable) arrayList);
this.f2253a.add(defaultBaseUrl);
this.f2253a.addAll(CollectionsKt.distinct(plus));
}
@Override
public final String popNextEndpoint() {
this.f2253a.poll();
return (String) this.f2253a.peek();
}
public static String a(String str) {
byte[] bArr;
String hexString;
byte[] bytes = str.getBytes(Charsets.UTF_8);
Intrinsics.checkNotNullExpressionValue(bytes, "this as java.lang.String).getBytes(charset)");
try {
MessageDigest messageDigest = MessageDigest.getInstance("SHA-224");
messageDigest.update(bytes);
bArr = messageDigest.digest();
} catch (NoSuchAlgorithmException unused) {
bArr = null;
}
return (bArr == null || (hexString = ByteArrayExtKt.toHexString(bArr)) == null) ? "appbaqend" : hexString;
}
}