Spermatid v6.1.8版本的 MD5 值为:a375ce51a42d528ba6e2583c10478296
以下内容为反编译后的 a.java 源代码,内容仅作参考
package p9;
import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import cn.hutool.setting.AbsSetting;
import java.net.URL;
import java.util.regex.Pattern;
public class a {
public static volatile a f35815g;
public Context f35816a;
public SharedPreferences f35817b;
public int f35818c = 60000;
public long f35819d;
public String f35820e;
public volatile boolean f35821f;
public class C1368a implements b {
public C1368a() {
}
@Override
public void a(int i10) {
a.this.f35821f = false;
}
@Override
public void a(byte[] bArr) {
try {
String e10 = com.shu.priory.utils.a.e(new String(bArr), "Mfv9IdVk");
String str = o9.c.f34602b;
URL url = new URL(str);
String[] split = e10.split(AbsSetting.DEFAULT_DELIMITER);
if (split.length > 0 && a.this.g(split[0])) {
String replaceFirst = str.replaceFirst(url.getHost(), split[0]);
if (!TextUtils.isEmpty(replaceFirst) && !replaceFirst.equals(a.this.f35820e)) {
SharedPreferences.Editor edit = a.this.f35817b.edit();
a.this.f35820e = replaceFirst;
edit.putString("server_ip", replaceFirst);
edit.apply();
}
if (split.length > 1) {
try {
a.this.f35818c = Integer.decode(split[1]).intValue() * 1000;
} catch (Exception unused) {
}
}
a.this.f35819d = System.currentTimeMillis();
}
} catch (Throwable unused2) {
}
a.this.f35821f = false;
}
}
public a(Context context) {
this.f35816a = context;
this.f35817b = context.getSharedPreferences("iflyads_dns", 0);
}
public static a f(Context context) {
if (f35815g == null) {
synchronized (a.class) {
if (f35815g == null) {
f35815g = new a(context.getApplicationContext());
}
}
}
return f35815g;
}
public String c() {
if (TextUtils.isEmpty(this.f35820e)) {
this.f35820e = this.f35817b.getString("server_ip", "");
}
return this.f35820e;
}
public boolean g(String str) {
if (TextUtils.isEmpty(str)) {
return false;
}
return Pattern.compile("([1-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])){3}").matcher(str).matches();
}
public void j() {
try {
if (!this.f35821f && System.currentTimeMillis() - this.f35819d >= this.f35818c) {
com.shu.priory.request.a aVar = new com.shu.priory.request.a();
aVar.e(this.f35816a);
aVar.n(0);
aVar.g("http://119.29.29.29/d?dn=" + com.shu.priory.utils.a.b(o9.c.f34601a, "Mfv9IdVk") + "&id=8555&ttl=1", null, null);
aVar.i(new C1368a());
this.f35821f = true;
}
} catch (Throwable unused) {
this.f35821f = false;
}
}
}