红果免费短剧 v6.2.3.32版本的 MD5 值为:a6b05492607eab2c8a25f26d2f238ae0
以下内容为反编译后的 AndroidNetworkLibrary.java 源代码,内容仅作参考
package com.ss.videoarch.live.ttquic;
import android.util.Log;
import com.bytedance.helios.statichook.api.ExtraInfo;
import com.bytedance.helios.statichook.api.HeliosApiHook;
import com.bytedance.helios.statichook.api.Result;
import java.io.FileDescriptor;
import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.URLConnection;
import java.net.UnknownHostException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.util.HashSet;
import java.util.Set;
class AndroidNetworkLibrary {
private static final Set<String> sAutoDohDotServers;
private static final Set<InetAddress> sAutoDohServers;
private static Boolean sHaveAccessNetworkState;
private static Boolean sHaveAccessWifiState;
public static boolean haveOnlyLoopbackAddresses() {
return false;
}
private static class a {
private static final Method f108093a;
private static Object a(Method method, Object obj, Object[] objArr) {
Result preInvoke = new HeliosApiHook().preInvoke(110000, "java/lang/reflect/Method", "invoke", method, new Object[]{obj, objArr}, "java.lang.Object", new ExtraInfo(true, "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;"));
return preInvoke.isIntercept() ? preInvoke.getReturnValue() : method.invoke(obj, objArr);
}
private a() {
}
static {
try {
f108093a = FileDescriptor.class.getMethod("setInt$", Integer.TYPE);
} catch (NoSuchMethodException | SecurityException e) {
throw new RuntimeException("Unable to get FileDescriptor.setInt$", e);
}
}
public static FileDescriptor a(int i) {
try {
FileDescriptor fileDescriptor = new FileDescriptor();
a(f108093a, fileDescriptor, new Object[]{Integer.valueOf(i)});
return fileDescriptor;
} catch (Throwable th) {
Log.e("AndroidNetworkLibrary", "FileDescriptor.setInt$() failed", th);
return null;
}
}
}
AndroidNetworkLibrary() {
}
static {
HashSet hashSet = new HashSet();
sAutoDohServers = hashSet;
HashSet hashSet2 = new HashSet();
sAutoDohDotServers = hashSet2;
try {
hashSet.add(InetAddress.getByName("8.8.8.8"));
hashSet.add(InetAddress.getByName("8.8.4.4"));
hashSet.add(InetAddress.getByName("2001:4860:4860::8888"));
hashSet.add(InetAddress.getByName("2001:4860:4860::8844"));
hashSet.add(InetAddress.getByName("1.1.1.1"));
hashSet.add(InetAddress.getByName("1.0.0.1"));
hashSet.add(InetAddress.getByName("2606:4700:4700::1111"));
hashSet.add(InetAddress.getByName("2606:4700:4700::1001"));
hashSet.add(InetAddress.getByName("9.9.9.9"));
hashSet.add(InetAddress.getByName("149.112.112.112"));
hashSet.add(InetAddress.getByName("2620:fe::fe"));
hashSet.add(InetAddress.getByName("2620:fe::9"));
hashSet2.add("dns.google");
hashSet2.add("1dot1dot1dot1.cloudflare-dns.com");
hashSet2.add("cloudflare-dns.com");
hashSet2.add("dns.quad9.net");
} catch (UnknownHostException e) {
throw new RuntimeException("Failed to parse IP addresses", e);
}
}
public static String getMimeTypeFromExtension(String str) {
return URLConnection.guessContentTypeFromName("foo." + str);
}
public static AndroidCertVerifyResult verifyServerCertificates(byte[][] bArr, String str, String str2) {
try {
return X509Util.verifyServerCertificates(bArr, str, str2);
} catch (IllegalArgumentException unused) {
return new AndroidCertVerifyResult(CertVerifyStatusAndroid.FAILED);
} catch (KeyStoreException unused2) {
return new AndroidCertVerifyResult(CertVerifyStatusAndroid.FAILED);
} catch (NoSuchAlgorithmException unused3) {
return new AndroidCertVerifyResult(CertVerifyStatusAndroid.FAILED);
}
}
}