正在查看: Crafto v9.3.3 应用的 l.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Crafto v9.3.3 应用的 l.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package nj;
import io.grpc.okhttp.internal.j;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.Socket;
import java.net.URI;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import mj.Y;
public class l {
public static final Logger b = Logger.getLogger(l.class.getName());
public static final l c;
public final io.grpc.okhttp.internal.j a;
public static final class a extends l {
public static final io.grpc.okhttp.internal.f<Socket> f851d;
public static final io.grpc.okhttp.internal.f<Socket> e;
public static final io.grpc.okhttp.internal.f<Socket> f;
public static final io.grpc.okhttp.internal.f<Socket> g;
public static final io.grpc.okhttp.internal.f<Socket> h;
public static final io.grpc.okhttp.internal.f<Socket> i;
public static final Method j;
public static final Method k;
public static final Method l;
public static final Method m;
public static final Method n;
public static final Method o;
public static final Constructor<?> p;
static {
Method method;
Method method2;
Method method3;
Method method4;
Method method5;
Method method6;
Constructor<?> constructor;
Logger logger = l.b;
Class<?> cls = Boolean.TYPE;
f851d = new io.grpc.okhttp.internal.f<>(null, "setUseSessionTickets", cls);
e = new io.grpc.okhttp.internal.f<>(null, "setHostname", String.class);
f = new io.grpc.okhttp.internal.f<>(byte[].class, "getAlpnSelectedProtocol", new Class[0]);
g = new io.grpc.okhttp.internal.f<>(null, "setAlpnProtocols", byte[].class);
h = new io.grpc.okhttp.internal.f<>(byte[].class, "getNpnSelectedProtocol", new Class[0]);
i = new io.grpc.okhttp.internal.f<>(null, "setNpnProtocols", byte[].class);
try {
method = SSLParameters.class.getMethod("setApplicationProtocols", String[].class);
try {
method3 = SSLParameters.class.getMethod("getApplicationProtocols", null);
} catch (ClassNotFoundException e2) {
e = e2;
method2 = null;
method3 = null;
method4 = null;
logger.log(Level.FINER, "Failed to find Android 10.0+ APIs", (Throwable) e);
method5 = null;
l = method;
m = method3;
n = method4;
j = method2;
k = method5;
method6 = SSLParameters.class.getMethod("setServerNames", List.class);
try {
constructor = Class.forName("javax.net.ssl.SNIHostName").getConstructor(String.class);
} catch (ClassNotFoundException e3) {
e = e3;
logger.log(Level.FINER, "Failed to find Android 7.0+ APIs", (Throwable) e);
constructor = null;
o = method6;
p = constructor;
} catch (NoSuchMethodException e4) {
e = e4;
logger.log(Level.FINER, "Failed to find Android 7.0+ APIs", (Throwable) e);
constructor = null;
o = method6;
p = constructor;
}
o = method6;
p = constructor;
} catch (NoSuchMethodException e5) {
e = e5;
method2 = null;
method3 = null;
method4 = null;
logger.log(Level.FINER, "Failed to find Android 10.0+ APIs", (Throwable) e);
method5 = null;
l = method;
m = method3;
n = method4;
j = method2;
k = method5;
method6 = SSLParameters.class.getMethod("setServerNames", List.class);
constructor = Class.forName("javax.net.ssl.SNIHostName").getConstructor(String.class);
o = method6;
p = constructor;
}
try {
method4 = SSLSocket.class.getMethod("getApplicationProtocol", null);
try {
Class<?> cls2 = Class.forName("android.net.ssl.SSLSockets");
method2 = cls2.getMethod("isSupportedSocket", SSLSocket.class);
try {
method5 = cls2.getMethod("setUseSessionTickets", SSLSocket.class, cls);
} catch (ClassNotFoundException e6) {
e = e6;
logger.log(Level.FINER, "Failed to find Android 10.0+ APIs", (Throwable) e);
method5 = null;
l = method;
m = method3;
n = method4;
j = method2;
k = method5;
method6 = SSLParameters.class.getMethod("setServerNames", List.class);
constructor = Class.forName("javax.net.ssl.SNIHostName").getConstructor(String.class);
o = method6;
p = constructor;
} catch (NoSuchMethodException e7) {
e = e7;
logger.log(Level.FINER, "Failed to find Android 10.0+ APIs", (Throwable) e);
method5 = null;
l = method;
m = method3;
n = method4;
j = method2;
k = method5;
method6 = SSLParameters.class.getMethod("setServerNames", List.class);
constructor = Class.forName("javax.net.ssl.SNIHostName").getConstructor(String.class);
o = method6;
p = constructor;
}
} catch (ClassNotFoundException e8) {
e = e8;
method2 = null;
} catch (NoSuchMethodException e9) {
e = e9;
method2 = null;
}
} catch (ClassNotFoundException e10) {
e = e10;
method2 = null;
method4 = null;
logger.log(Level.FINER, "Failed to find Android 10.0+ APIs", (Throwable) e);
method5 = null;
l = method;
m = method3;
n = method4;
j = method2;
k = method5;
method6 = SSLParameters.class.getMethod("setServerNames", List.class);
constructor = Class.forName("javax.net.ssl.SNIHostName").getConstructor(String.class);
o = method6;
p = constructor;
} catch (NoSuchMethodException e11) {
e = e11;
method2 = null;
method4 = null;
logger.log(Level.FINER, "Failed to find Android 10.0+ APIs", (Throwable) e);
method5 = null;
l = method;
m = method3;
n = method4;
j = method2;
k = method5;
method6 = SSLParameters.class.getMethod("setServerNames", List.class);
constructor = Class.forName("javax.net.ssl.SNIHostName").getConstructor(String.class);
o = method6;
p = constructor;
}
} catch (ClassNotFoundException e12) {
e = e12;
method = null;
} catch (NoSuchMethodException e13) {
e = e13;
method = null;
}
l = method;
m = method3;
n = method4;
j = method2;
k = method5;
try {
method6 = SSLParameters.class.getMethod("setServerNames", List.class);
constructor = Class.forName("javax.net.ssl.SNIHostName").getConstructor(String.class);
} catch (ClassNotFoundException e14) {
e = e14;
method6 = null;
} catch (NoSuchMethodException e15) {
e = e15;
method6 = null;
}
o = method6;
p = constructor;
}
@Override
public final void a(javax.net.ssl.SSLSocket r9, java.lang.String r10, java.util.List<io.grpc.okhttp.internal.k> r11) {
throw new UnsupportedOperationException("Method not decompiled: nj.l.a.a(javax.net.ssl.SSLSocket, java.lang.String, java.util.List):void");
}
@Override
public final String b(SSLSocket sSLSocket) {
Logger logger = l.b;
Method method = n;
if (method != null) {
try {
return (String) method.invoke(sSLSocket, null);
} catch (IllegalAccessException e2) {
throw new RuntimeException(e2);
} catch (InvocationTargetException e3) {
if (!(e3.getTargetException() instanceof UnsupportedOperationException)) {
throw new RuntimeException(e3);
}
logger.log(Level.FINER, "Socket unsupported for getApplicationProtocol, will try old methods");
}
}
io.grpc.okhttp.internal.j jVar = this.a;
if (jVar.e() == j.e.ALPN_AND_NPN) {
try {
byte[] bArr = (byte[]) f.e(new Object[0], sSLSocket);
if (bArr != null) {
return new String(bArr, io.grpc.okhttp.internal.n.b);
}
} catch (Exception e4) {
logger.log(Level.FINE, "Failed calling getAlpnSelectedProtocol()", (Throwable) e4);
}
}
if (jVar.e() != j.e.NONE) {
try {
byte[] bArr2 = (byte[]) h.e(new Object[0], sSLSocket);
if (bArr2 != null) {
return new String(bArr2, io.grpc.okhttp.internal.n.b);
}
} catch (Exception e5) {
logger.log(Level.FINE, "Failed calling getNpnSelectedProtocol()", (Throwable) e5);
}
}
return null;
}
@Override
public final String d(SSLSocket sSLSocket, String str, List<io.grpc.okhttp.internal.k> list) throws IOException {
String b = b(sSLSocket);
return b == null ? super.d(sSLSocket, str, list) : b;
}
}
static {
l lVar;
io.grpc.okhttp.internal.j jVar = io.grpc.okhttp.internal.j.f620d;
ClassLoader classLoader = l.class.getClassLoader();
try {
classLoader.loadClass("com.android.org.conscrypt.OpenSSLSocketImpl");
} catch (ClassNotFoundException e) {
Level level = Level.FINE;
Logger logger = b;
logger.log(level, "Unable to find Conscrypt. Skipping", (Throwable) e);
try {
classLoader.loadClass("org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl");
} catch (ClassNotFoundException e2) {
logger.log(Level.FINE, "Unable to find any OpenSSLSocketImpl. Skipping", (Throwable) e2);
lVar = new l(jVar);
}
}
lVar = new a(jVar);
c = lVar;
}
public l(io.grpc.okhttp.internal.j jVar) {
Gf.m.i(jVar, "platform");
this.a = jVar;
}
public static boolean c(String str) {
if (str.contains("_")) {
return false;
}
try {
URI a2 = Y.a(str);
Gf.m.e(str, "No host in authority '%s'", a2.getHost() != null);
Gf.m.e(str, "Userinfo must not be present on authority: '%s'", a2.getUserInfo() == null);
return true;
} catch (IllegalArgumentException unused) {
return false;
}
}
public void a(SSLSocket sSLSocket, String str, List<io.grpc.okhttp.internal.k> list) {
this.a.c(sSLSocket, str, list);
}
public String b(SSLSocket sSLSocket) {
return this.a.d(sSLSocket);
}
public String d(SSLSocket sSLSocket, String str, List<io.grpc.okhttp.internal.k> list) throws IOException {
io.grpc.okhttp.internal.j jVar = this.a;
if (list != null) {
a(sSLSocket, str, list);
}
try {
sSLSocket.startHandshake();
String b2 = b(sSLSocket);
if (b2 != null) {
return b2;
}
throw new RuntimeException("TLS ALPN negotiation failed with protocols: " + list);
} finally {
jVar.a(sSLSocket);
}
}
}