正在查看: 哔哩哔哩 v1.6.6 应用的 aad.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 哔哩哔哩 v1.6.6 应用的 aad.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package bl;
import android.text.TextUtils;
import com.bilibili.tv.MainApplication;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.util.UUID;
public class aad {
private static aad b;
private String a = "";
public static aad a() {
synchronized (aad.class) {
if (b == null) {
b = new aad();
}
}
return b;
}
public String b() {
String str;
synchronized (aad.class) {
str = TextUtils.isEmpty(this.a) ? "" : this.a;
}
if (TextUtils.isEmpty(str)) {
lv.c(2, new Runnable() {
@Override
public void run() {
String b2 = aad.b(abc.b().i());
if (TextUtils.isEmpty(b2)) {
String d = aad.d();
if (d == null) {
try {
String c = aae.c(MainApplication.a());
if (c != null && c.length() > 0) {
if (c.length() > 36) {
c = c.substring(0, 36);
}
d = c.concat("infoc");
}
} catch (Throwable unused) {
d = UUID.randomUUID().toString();
}
}
synchronized (aad.class) {
aad.this.a = d;
if (!TextUtils.isEmpty(aad.this.a)) {
abc.b().a(aad.this.a);
}
}
return;
}
synchronized (aad.class) {
aad.this.a = b2;
}
}
});
synchronized (aad.class) {
str = this.a;
}
}
return str;
}
public static String d() {
try {
HttpURLConnection a = adi.a("http://data.bilibili.com/gv/", "Mozilla/5.0 BiliTV/1.6.6 ([email protected])", 5000, 5000);
a.setInstanceFollowRedirects(false);
try {
return b(200 == a.getResponseCode() ? adi.a(a) : null);
} catch (IOException unused) {
return null;
} finally {
a.disconnect();
}
} catch (IOException unused2) {
return null;
}
}
public static String b(String str) {
int length;
if (str == null || (length = str.length()) == 0 || length > 64) {
return null;
}
for (int i = 0; i < length; i++) {
char charAt = str.charAt(i);
if (('A' > charAt || charAt > 'Z') && (('a' > charAt || charAt > 'z') && !(('0' <= charAt && charAt <= '9') || charAt == '-' || charAt == '_'))) {
return null;
}
}
return str;
}
}