正在查看: 91看片 v1.0.4 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 91看片 v1.0.4 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package w9;
import android.os.Build;
import android.util.Log;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.security.NoSuchAlgorithmException;
import java.security.Security;
import java.security.cert.Certificate;
import java.security.cert.TrustAnchor;
import java.security.cert.X509Certificate;
import java.util.List;
import javax.annotation.Nullable;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.X509TrustManager;
import p9.v;
class d extends i {
private final Class<?> f16164c;
private final h<Socket> f16165d;
private final h<Socket> f16166e;
private final h<Socket> f16167f;
private final h<Socket> f16168g;
private final c f16169h = c.b();
static final class a extends y9.c {
private final Object f16170a;
private final Method f16171b;
a(Object obj, Method method) {
this.f16170a = obj;
this.f16171b = method;
}
@Override
public List<Certificate> a(List<Certificate> list, String str) {
try {
return (List) this.f16171b.invoke(this.f16170a, (X509Certificate[]) list.toArray(new X509Certificate[list.size()]), "RSA", str);
} catch (IllegalAccessException e10) {
throw new AssertionError(e10);
} catch (InvocationTargetException e11) {
SSLPeerUnverifiedException sSLPeerUnverifiedException = new SSLPeerUnverifiedException(e11.getMessage());
sSLPeerUnverifiedException.initCause(e11);
throw sSLPeerUnverifiedException;
}
}
public boolean equals(Object obj) {
return obj instanceof a;
}
public int hashCode() {
return 0;
}
}
static final class b implements y9.e {
private final X509TrustManager f16172a;
private final Method f16173b;
b(X509TrustManager x509TrustManager, Method method) {
this.f16173b = method;
this.f16172a = x509TrustManager;
}
@Override
public X509Certificate a(X509Certificate x509Certificate) {
try {
TrustAnchor trustAnchor = (TrustAnchor) this.f16173b.invoke(this.f16172a, x509Certificate);
if (trustAnchor != null) {
return trustAnchor.getTrustedCert();
}
return null;
} catch (IllegalAccessException e10) {
throw q9.c.b("unable to get issues and signature", e10);
} catch (InvocationTargetException unused) {
return null;
}
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof b)) {
return false;
}
b bVar = (b) obj;
return this.f16172a.equals(bVar.f16172a) && this.f16173b.equals(bVar.f16173b);
}
public int hashCode() {
return this.f16172a.hashCode() + (this.f16173b.hashCode() * 31);
}
}
static final class c {
private final Method f16174a;
private final Method f16175b;
private final Method f16176c;
c(Method method, Method method2, Method method3) {
this.f16174a = method;
this.f16175b = method2;
this.f16176c = method3;
}
static c b() {
Method method;
Method method2;
Method method3 = null;
try {
Class<?> cls = Class.forName("dalvik.system.CloseGuard");
Method method4 = cls.getMethod("get", new Class[0]);
method2 = cls.getMethod("open", String.class);
method = cls.getMethod("warnIfOpen", new Class[0]);
method3 = method4;
} catch (Exception unused) {
method = null;
method2 = null;
}
return new c(method3, method2, method);
}
Object a(String str) {
Method method = this.f16174a;
if (method != null) {
try {
Object invoke = method.invoke(null, new Object[0]);
this.f16175b.invoke(invoke, str);
return invoke;
} catch (Exception unused) {
}
}
return null;
}
boolean c(Object obj) {
if (obj == null) {
return false;
}
try {
this.f16176c.invoke(obj, new Object[0]);
return true;
} catch (Exception unused) {
return false;
}
}
}
d(Class<?> cls, h<Socket> hVar, h<Socket> hVar2, h<Socket> hVar3, h<Socket> hVar4) {
this.f16164c = cls;
this.f16165d = hVar;
this.f16166e = hVar2;
this.f16167f = hVar3;
this.f16168g = hVar4;
}
private boolean u(String str, Class<?> cls, Object obj) {
try {
return ((Boolean) cls.getMethod("isCleartextTrafficPermitted", new Class[0]).invoke(obj, new Object[0])).booleanValue();
} catch (NoSuchMethodException unused) {
return super.q(str);
}
}
private boolean v(String str, Class<?> cls, Object obj) {
try {
return ((Boolean) cls.getMethod("isCleartextTrafficPermitted", String.class).invoke(obj, str)).booleanValue();
} catch (NoSuchMethodException unused) {
return u(str, cls, obj);
}
}
public static i w() {
Class<?> cls;
h hVar;
h hVar2;
if (!i.p()) {
return null;
}
try {
try {
cls = Class.forName("com.android.org.conscrypt.SSLParametersImpl");
} catch (ClassNotFoundException unused) {
cls = Class.forName("org.apache.harmony.xnet.provider.jsse.SSLParametersImpl");
}
Class<?> cls2 = cls;
h hVar3 = new h(null, "setUseSessionTickets", Boolean.TYPE);
h hVar4 = new h(null, "setHostname", String.class);
if (y()) {
h hVar5 = new h(byte[].class, "getAlpnSelectedProtocol", new Class[0]);
hVar2 = new h(null, "setAlpnProtocols", byte[].class);
hVar = hVar5;
} else {
hVar = null;
hVar2 = null;
}
return new d(cls2, hVar3, hVar4, hVar, hVar2);
} catch (ClassNotFoundException unused2) {
return null;
}
}
static int x() {
try {
return Build.VERSION.SDK_INT;
} catch (NoClassDefFoundError unused) {
return 0;
}
}
private static boolean y() {
if (Security.getProvider("GMSCore_OpenSSL") != null) {
return true;
}
try {
Class.forName("android.net.Network");
return true;
} catch (ClassNotFoundException unused) {
return false;
}
}
@Override
public y9.c c(X509TrustManager x509TrustManager) {
try {
Class<?> cls = Class.forName("android.net.http.X509TrustManagerExtensions");
return new a(cls.getConstructor(X509TrustManager.class).newInstance(x509TrustManager), cls.getMethod("checkServerTrusted", X509Certificate[].class, String.class, String.class));
} catch (Exception unused) {
return super.c(x509TrustManager);
}
}
@Override
public y9.e d(X509TrustManager x509TrustManager) {
try {
Method declaredMethod = x509TrustManager.getClass().getDeclaredMethod("findTrustAnchorByIssuerAndSignature", X509Certificate.class);
declaredMethod.setAccessible(true);
return new b(x509TrustManager, declaredMethod);
} catch (NoSuchMethodException unused) {
return super.d(x509TrustManager);
}
}
@Override
public void g(SSLSocket sSLSocket, String str, List<v> list) {
if (str != null) {
this.f16165d.e(sSLSocket, Boolean.TRUE);
this.f16166e.e(sSLSocket, str);
}
h<Socket> hVar = this.f16168g;
if (hVar == null || !hVar.g(sSLSocket)) {
return;
}
this.f16168g.f(sSLSocket, i.e(list));
}
@Override
public void h(Socket socket, InetSocketAddress inetSocketAddress, int i10) {
try {
socket.connect(inetSocketAddress, i10);
} catch (AssertionError e10) {
if (!q9.c.y(e10)) {
throw e10;
}
throw new IOException(e10);
} catch (ClassCastException e11) {
if (Build.VERSION.SDK_INT != 26) {
throw e11;
}
IOException iOException = new IOException("Exception in connect");
iOException.initCause(e11);
throw iOException;
} catch (SecurityException e12) {
IOException iOException2 = new IOException("Exception in connect");
iOException2.initCause(e12);
throw iOException2;
}
}
@Override
public SSLContext m() {
boolean z10 = true;
try {
if (Build.VERSION.SDK_INT >= 22) {
z10 = false;
}
} catch (NoClassDefFoundError unused) {
}
if (z10) {
try {
return SSLContext.getInstance("TLSv1.2");
} catch (NoSuchAlgorithmException unused2) {
}
}
try {
return SSLContext.getInstance("TLS");
} catch (NoSuchAlgorithmException e10) {
throw new IllegalStateException("No TLS provider", e10);
}
}
@Override
@Nullable
public String n(SSLSocket sSLSocket) {
byte[] bArr;
h<Socket> hVar = this.f16167f;
if (hVar == null || !hVar.g(sSLSocket) || (bArr = (byte[]) this.f16167f.f(sSLSocket, new Object[0])) == null) {
return null;
}
return new String(bArr, q9.c.f13087j);
}
@Override
public Object o(String str) {
return this.f16169h.a(str);
}
@Override
public boolean q(String str) {
if (Build.VERSION.SDK_INT < 23) {
return super.q(str);
}
try {
Class<?> cls = Class.forName("android.security.NetworkSecurityPolicy");
return v(str, cls, cls.getMethod("getInstance", new Class[0]).invoke(null, new Object[0]));
} catch (ClassNotFoundException | NoSuchMethodException unused) {
return super.q(str);
} catch (IllegalAccessException e10) {
e = e10;
throw q9.c.b("unable to determine cleartext support", e);
} catch (IllegalArgumentException e11) {
e = e11;
throw q9.c.b("unable to determine cleartext support", e);
} catch (InvocationTargetException e12) {
e = e12;
throw q9.c.b("unable to determine cleartext support", e);
}
}
@Override
public void s(int i10, String str, @Nullable Throwable th) {
int min;
int i11 = i10 != 5 ? 3 : 5;
if (th != null) {
str = str + '\n' + Log.getStackTraceString(th);
}
int i12 = 0;
int length = str.length();
while (i12 < length) {
int indexOf = str.indexOf(10, i12);
if (indexOf == -1) {
indexOf = length;
}
while (true) {
min = Math.min(indexOf, i12 + 4000);
Log.println(i11, "OkHttp", str.substring(i12, min));
if (min >= indexOf) {
break;
} else {
i12 = min;
}
}
i12 = min + 1;
}
}
@Override
public void t(String str, Object obj) {
if (this.f16169h.c(obj)) {
return;
}
s(5, str, null);
}
}