正在查看: jsgt v4.8.1 应用的 s0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: jsgt v4.8.1 应用的 s0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package qh;
import android.content.Context;
import android.net.Uri;
import android.text.TextUtils;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
public abstract class s0 {
public static class a extends r0 {
public final String m(Context context, String str, ArrayList arrayList) {
URL url;
if (arrayList == null) {
url = new URL(str);
} else {
Uri.Builder buildUpon = Uri.parse(str).buildUpon();
Iterator it2 = arrayList.iterator();
while (it2.hasNext()) {
w wVar = (w) it2.next();
buildUpon.appendQueryParameter(wVar.a(), wVar.b());
}
url = new URL(buildUpon.toString());
}
return x.c(context, url);
}
}
public static int a(a aVar, String str, ArrayList arrayList, String str2) {
int length;
int i;
int i2 = 0;
int i3 = aVar.a;
if (i3 == 1) {
length = str.length();
if (!TextUtils.isEmpty(str2)) {
try {
i2 = str2.getBytes("UTF-8").length;
} catch (UnsupportedEncodingException unused) {
}
}
i = (((i2 + 243) / 1448) * 132) + 1080;
} else {
if (i3 != 2) {
return -1;
}
Iterator it2 = arrayList.iterator();
int i4 = 0;
while (it2.hasNext()) {
w wVar = (w) it2.next();
if (!TextUtils.isEmpty(wVar.a())) {
i4 += wVar.a().length();
}
if (!TextUtils.isEmpty(wVar.b())) {
i4 += wVar.b().length();
}
}
int i5 = i4 * 2;
length = str.length();
if (!TextUtils.isEmpty(str2)) {
try {
i2 = str2.getBytes("UTF-8").length;
} catch (UnsupportedEncodingException unused2) {
}
}
i = (((i5 + 200) / 1448) * 132) + 1011 + i5;
}
return i + length + i2;
}
public static String b(Context context) {
a aVar = new a();
if (!x.h(context)) {
return null;
}
try {
new ArrayList();
o0 f = o0.f();
f.getClass();
if (TextUtils.isEmpty("https://resolver.msg.xiaomi.net/psc/?t=a")) {
throw new IllegalArgumentException("the url is empty");
}
k0 e = f.e(new URL("https://resolver.msg.xiaomi.net/psc/?t=a").getHost(), true);
ArrayList<String> c = e.c("https://resolver.msg.xiaomi.net/psc/?t=a");
if (!c.contains("https://resolver.msg.xiaomi.net/psc/?t=a")) {
c.add("https://resolver.msg.xiaomi.net/psc/?t=a");
}
Iterator<String> it2 = c.iterator();
String str = null;
while (it2.hasNext()) {
String next = it2.next();
long currentTimeMillis = System.currentTimeMillis();
try {
str = aVar.m(context, next, null);
} catch (IOException e2) {
try {
e.h(new URL(next).getHost(), new j0(-1, System.currentTimeMillis() - currentTimeMillis, a(aVar, next, null, str), e2));
} catch (MalformedURLException unused) {
}
e2.printStackTrace();
}
if (TextUtils.isEmpty(str)) {
try {
e.h(new URL(next).getHost(), new j0(-1, System.currentTimeMillis() - currentTimeMillis, a(aVar, next, null, str), null));
} catch (MalformedURLException unused2) {
}
} else {
try {
e.h(new URL(next).getHost(), new j0(0, System.currentTimeMillis() - currentTimeMillis, a(aVar, next, null, str), null));
break;
} catch (MalformedURLException unused3) {
}
}
}
return str;
} catch (MalformedURLException e3) {
e3.printStackTrace();
return null;
}
}
}