MD5 校验值:13e9f681f5bed77188ac69741746def0
p33.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package libs; import android.net.SSLCertificateSocketFactory; import android.net.SSLSessionCache; import java.io.InputStream; import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; import java.security.KeyStore; import java.security.SecureRandom; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.net.ServerSocketFactory; import javax.net.ssl.KeyManager; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLServerSocket; import javax.net.ssl.SSLSocket; import javax.net.ssl.TrustManager; public abstract class p33 { public static final List a = Arrays.asList("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_RSA_WITH_RC4_128_SHA", "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", "TLS_DHE_RSA_WITH_AES_256_CBC_SHA", "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_GCM_SHA384", "TLS_RSA_WITH_AES_256_CBC_SHA256", "TLS_RSA_WITH_AES_256_CBC_SHA", "TLS_RSA_WITH_AES_128_GCM_SHA256", "TLS_RSA_WITH_AES_128_CBC_SHA256", "TLS_RSA_WITH_AES_128_CBC_SHA", "ECDHE-RSA-AES256-GCM-SHA384", "ECDHE-RSA-AES256-SHA384", "ECDHE-RSA-AES256-SHA", "ECDHE-RSA-AES128-GCM-SHA256", "ECDHE-RSA-AES128-SHA256", "ECDHE-RSA-AES128-SHA", "ECDHE-RSA-RC4-SHA", "DHE-RSA-AES256-GCM-SHA384", "DHE-RSA-AES256-SHA256", "DHE-RSA-AES256-SHA", "DHE-RSA-AES128-GCM-SHA256", "DHE-RSA-AES128-SHA256", "DHE-RSA-AES128-SHA", "AES256-GCM-SHA384", "AES256-SHA256", "AES256-SHA", "AES128-GCM-SHA256", "AES128-SHA256", "AES128-SHA"); public static final List b = Arrays.asList("SSL_RSA_WITH_DES_CBC_SHA", "SSL_DHE_RSA_WITH_DES_CBC_SHA", "SSL_DHE_DSS_WITH_DES_CBC_SHA", "SSL_RSA_EXPORT_WITH_RC4_40_MD5", "SSL_RSA_EXPORT_WITH_DES40_CBC_SHA", "SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA", "SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA"); public static ServerSocket a(String str, SSLContext sSLContext, int i, boolean z) { ServerSocketFactory serverSocketFactory; InetSocketAddress inetSocketAddress; if (sSLContext != null) { serverSocketFactory = sSLContext.getServerSocketFactory(); } else { serverSocketFactory = ServerSocketFactory.getDefault(); } ServerSocket createServerSocket = serverSocketFactory.createServerSocket(); if (sSLContext != null) { SSLServerSocket sSLServerSocket = (SSLServerSocket) createServerSocket; sSLServerSocket.setEnabledProtocols(e(sSLServerSocket.getSupportedProtocols(), z)); sSLServerSocket.setEnabledCipherSuites(d(sSLServerSocket.getSupportedCipherSuites())); sSLServerSocket.setUseClientMode(false); sSLServerSocket.setWantClientAuth(false); sSLServerSocket.setNeedClientAuth(false); } createServerSocket.setSoTimeout(20000); createServerSocket.setReuseAddress(true); if (str != null) { inetSocketAddress = new InetSocketAddress(str, i); } else { inetSocketAddress = new InetSocketAddress(i); } createServerSocket.bind(inetSocketAddress); return createServerSocket; } public static void b(SSLSocket sSLSocket, String str, int i, boolean z, boolean z2, boolean z3) { sSLSocket.setUseClientMode(z3); sSLSocket.setSoTimeout(i); sSLSocket.setKeepAlive(z); sSLSocket.setTcpNoDelay(z2); sSLSocket.setSoLinger(true, i / 1000); sSLSocket.setReceiveBufferSize(524288); sSLSocket.setSendBufferSize(524288); try { SSLCertificateSocketFactory sSLCertificateSocketFactory = (SSLCertificateSocketFactory) SSLCertificateSocketFactory.getDefault(0, new SSLSessionCache(tw0.g)); if (vf3.l()) { sSLCertificateSocketFactory.setHostname(sSLSocket, str); sSLCertificateSocketFactory.setUseSessionTickets(sSLSocket, true); } else { SSLCertificateSocketFactory.class.getMethod("setHostname", Socket.class, String.class).invoke(sSLCertificateSocketFactory, sSLSocket, str); SSLCertificateSocketFactory.class.getMethod("setUseSessionTickets", Socket.class, Boolean.TYPE).invoke(sSLCertificateSocketFactory, sSLSocket, Boolean.TRUE); } } catch (Throwable unused) { } } public static SSLContext c(InputStream inputStream, String str, char[] cArr, char[] cArr2) { if (cArr == null) { cArr = new char[0]; } if (cArr2 == null) { cArr2 = new char[0]; } KeyStore S = ll.S(inputStream, cArr, str); KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("x509"); keyManagerFactory.init(S, cArr2); KeyManager[] keyManagers = keyManagerFactory.getKeyManagers(); TrustManager[] trustManagerArr = {jm3.c}; SecureRandom secureRandom = new SecureRandom(); x8.g.getClass(); SSLContext d = x8.d(); d.init(keyManagers, trustManagerArr, secureRandom); return d; } public static String[] d(String[] strArr) { ArrayList arrayList = new ArrayList(a); arrayList.retainAll(Arrays.asList(strArr)); for (String str : strArr) { if (!arrayList.contains(str) && !b.contains(str)) { arrayList.add(str); } } return (String[]) arrayList.toArray(new String[arrayList.size()]); } public static String[] e(String[] strArr, boolean z) { List asList = Arrays.asList(strArr); ArrayList arrayList = new ArrayList(); if (z && vf3.u() && asList.contains("TLSv1.3")) { arrayList.add("TLSv1.3"); } if (asList.contains("TLSv1.2")) { arrayList.add("TLSv1.2"); } if (asList.contains("TLSv1.1")) { arrayList.add("TLSv1.1"); } if (asList.contains("TLSv1.0")) { arrayList.add("TLSv1.0"); } if (asList.contains("TLSv1")) { arrayList.add("TLSv1"); } if (asList.contains("SSLv3") && arrayList.size() == 0) { arrayList.add("SSLv3"); } return (String[]) arrayList.toArray(new String[0]); } }