正在查看: 万能钥匙 v1.1.23 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 万能钥匙 v1.1.23 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.finogeeks.lib.applet.f.c.i0.f;
import com.finogeeks.lib.applet.f.c.a0;
import com.finogeeks.lib.applet.f.c.c0;
import com.finogeeks.lib.applet.f.c.e0;
import com.finogeeks.lib.applet.f.c.i;
import com.finogeeks.lib.applet.f.c.i0.i.g;
import com.finogeeks.lib.applet.f.c.i0.l.a;
import com.finogeeks.lib.applet.f.c.j;
import com.finogeeks.lib.applet.f.c.k;
import com.finogeeks.lib.applet.f.c.p;
import com.finogeeks.lib.applet.f.c.r;
import com.finogeeks.lib.applet.f.c.t;
import com.finogeeks.lib.applet.f.c.u;
import com.finogeeks.lib.applet.f.c.x;
import com.finogeeks.lib.applet.f.c.y;
import com.finogeeks.lib.applet.f.d.n;
import com.finogeeks.lib.applet.f.d.u;
import com.finogeeks.lib.applet.f.d.v;
import com.finogeeks.lib.applet.media.video.client.AbsFinMediaPlayer;
import java.io.IOException;
import java.lang.ref.Reference;
import java.net.ConnectException;
import java.net.Proxy;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
public final class c extends g.h implements i {
private final j b;
private final e0 c;
private Socket d;
private Socket e;
private r f;
private y g;
private com.finogeeks.lib.applet.f.c.i0.i.g h;
private com.finogeeks.lib.applet.f.d.e i;
private com.finogeeks.lib.applet.f.d.d j;
public boolean k;
public int l;
public int m = 1;
public final List<Reference<g>> n = new ArrayList();
public long o = Long.MAX_VALUE;
public class a extends a.g {
final g d;
public a(c cVar, boolean z10, com.finogeeks.lib.applet.f.d.e eVar, com.finogeeks.lib.applet.f.d.d dVar, g gVar) {
super(z10, eVar, dVar);
this.d = gVar;
}
@Override
public void close() {
g gVar = this.d;
gVar.a(true, gVar.b(), -1L, null);
}
}
public c(j jVar, e0 e0Var) {
this.b = jVar;
this.c = e0Var;
}
private a0 a(int i, int i2, a0 a0Var, t tVar) {
String str = "CONNECT " + com.finogeeks.lib.applet.f.c.i0.c.a(tVar, true) + " HTTP/1.1";
while (true) {
com.finogeeks.lib.applet.f.c.i0.h.a aVar = new com.finogeeks.lib.applet.f.c.i0.h.a(null, null, this.i, this.j);
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
this.i.g().a(i, timeUnit);
this.j.g().a(i2, timeUnit);
aVar.a(a0Var.c(), str);
aVar.a();
c0 a2 = aVar.a(false).a(a0Var).a();
long a3 = com.finogeeks.lib.applet.f.c.i0.g.e.a(a2);
if (a3 == -1) {
a3 = 0;
}
u b = aVar.b(a3);
com.finogeeks.lib.applet.f.c.i0.c.b(b, Integer.MAX_VALUE, timeUnit);
b.close();
int d = a2.d();
if (d == 200) {
if (this.i.f().m() && this.j.f().m()) {
return null;
}
throw new IOException("TLS tunnel buffered too many bytes!");
}
if (d != 407) {
throw new IOException("Unexpected response code for CONNECT: " + a2.d());
}
a0 a4 = this.c.a().g().a(this.c, a2);
if (a4 == null) {
throw new IOException("Failed to authenticate with proxy");
}
if ("close".equalsIgnoreCase(a2.a("Connection"))) {
return a4;
}
a0Var = a4;
}
}
private void a(int i) {
this.e.setSoTimeout(0);
com.finogeeks.lib.applet.f.c.i0.i.g a2 = new g.C0105g(true).a(this.e, this.c.a().k().g(), this.i, this.j).a(this).a(i).a();
this.h = a2;
a2.c();
}
private void a(int i, int i2, int i3, com.finogeeks.lib.applet.f.c.e eVar, p pVar) {
a0 g = g();
t g2 = g.g();
for (int i4 = 0; i4 < 21; i4++) {
a(i, i2, eVar, pVar);
g = a(i2, i3, g, g2);
if (g == null) {
return;
}
com.finogeeks.lib.applet.f.c.i0.c.a(this.d);
this.d = null;
this.j = null;
this.i = null;
pVar.a(eVar, this.c.d(), this.c.b(), null);
}
}
private void a(int i, int i2, com.finogeeks.lib.applet.f.c.e eVar, p pVar) {
Proxy b = this.c.b();
this.d = (b.type() == Proxy.Type.DIRECT || b.type() == Proxy.Type.HTTP) ? this.c.a().i().createSocket() : new Socket(b);
pVar.a(eVar, this.c.d(), b);
this.d.setSoTimeout(i2);
try {
com.finogeeks.lib.applet.f.c.i0.j.f.c().a(this.d, this.c.d(), i);
try {
this.i = n.a(n.b(this.d));
this.j = n.a(n.a(this.d));
} catch (NullPointerException e) {
if ("throw with null exception".equals(e.getMessage())) {
throw new IOException(e);
}
}
} catch (ConnectException e2) {
ConnectException connectException = new ConnectException("Failed to connect to " + this.c.d());
connectException.initCause(e2);
throw connectException;
}
}
private void a(b bVar) {
SSLSocket sSLSocket;
com.finogeeks.lib.applet.f.c.a a2 = this.c.a();
SSLSocket sSLSocket2 = null;
try {
try {
sSLSocket = (SSLSocket) a2.j().createSocket(this.d, a2.k().g(), a2.k().k(), true);
} catch (AssertionError e) {
e = e;
}
} catch (Throwable th2) {
th = th2;
}
try {
k a3 = bVar.a(sSLSocket);
if (a3.c()) {
com.finogeeks.lib.applet.f.c.i0.j.f.c().a(sSLSocket, a2.k().g(), a2.e());
}
sSLSocket.startHandshake();
SSLSession session = sSLSocket.getSession();
r a4 = r.a(session);
if (a2.d().verify(a2.k().g(), session)) {
a2.a().a(a2.k().g(), a4.b());
String b = a3.c() ? com.finogeeks.lib.applet.f.c.i0.j.f.c().b(sSLSocket) : null;
this.e = sSLSocket;
this.i = n.a(n.b(sSLSocket));
this.j = n.a(n.a(this.e));
this.f = a4;
this.g = b != null ? y.a(b) : y.HTTP_1_1;
com.finogeeks.lib.applet.f.c.i0.j.f.c().a(sSLSocket);
return;
}
X509Certificate x509Certificate = (X509Certificate) a4.b().get(0);
throw new SSLPeerUnverifiedException("Hostname " + a2.k().g() + " not verified:\n certificate: " + com.finogeeks.lib.applet.f.c.g.a((Certificate) x509Certificate) + "\n DN: " + x509Certificate.getSubjectDN().getName() + "\n subjectAltNames: " + com.finogeeks.lib.applet.f.c.i0.k.d.a(x509Certificate));
} catch (AssertionError e2) {
e = e2;
if (!com.finogeeks.lib.applet.f.c.i0.c.a(e)) {
throw e;
}
throw new IOException(e);
} catch (Throwable th3) {
th = th3;
sSLSocket2 = sSLSocket;
if (sSLSocket2 != null) {
com.finogeeks.lib.applet.f.c.i0.j.f.c().a(sSLSocket2);
}
com.finogeeks.lib.applet.f.c.i0.c.a((Socket) sSLSocket2);
throw th;
}
}
private void a(b bVar, int i, com.finogeeks.lib.applet.f.c.e eVar, p pVar) {
if (this.c.a().j() != null) {
pVar.g(eVar);
a(bVar);
pVar.a(eVar, this.f);
if (this.g == y.HTTP_2) {
a(i);
return;
}
return;
}
List<y> e = this.c.a().e();
y yVar = y.H2_PRIOR_KNOWLEDGE;
if (!e.contains(yVar)) {
this.e = this.d;
this.g = y.HTTP_1_1;
} else {
this.e = this.d;
this.g = yVar;
a(i);
}
}
private a0 g() {
return new a0.a().a(this.c.a().k()).b("Host", com.finogeeks.lib.applet.f.c.i0.c.a(this.c.a().k(), true)).b("Proxy-Connection", "Keep-Alive").b(AbsFinMediaPlayer.HEADER_USER_AGENT, com.finogeeks.lib.applet.f.c.i0.d.a()).a();
}
public com.finogeeks.lib.applet.f.c.i0.g.c a(x xVar, u.a aVar, g gVar) {
com.finogeeks.lib.applet.f.c.i0.i.g gVar2 = this.h;
if (gVar2 != null) {
return new com.finogeeks.lib.applet.f.c.i0.i.f(xVar, aVar, gVar, gVar2);
}
this.e.setSoTimeout(aVar.c());
v g = this.i.g();
long c = aVar.c();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
g.a(c, timeUnit);
this.j.g().a(aVar.d(), timeUnit);
return new com.finogeeks.lib.applet.f.c.i0.h.a(xVar, gVar, this.i, this.j);
}
public a.g a(g gVar) {
return new a(this, true, this.i, this.j, gVar);
}
@Override
public y a() {
return this.g;
}
public void a(int r13, int r14, int r15, int r16, boolean r17, com.finogeeks.lib.applet.f.c.e r18, com.finogeeks.lib.applet.f.c.p r19) {
throw new UnsupportedOperationException("Method not decompiled: com.finogeeks.lib.applet.f.c.i0.f.c.a(int, int, int, int, boolean, com.finogeeks.lib.applet.f.c.e, com.finogeeks.lib.applet.f.c.p):void");
}
@Override
public void a(com.finogeeks.lib.applet.f.c.i0.i.g gVar) {
synchronized (this.b) {
this.m = gVar.b();
}
}
@Override
public void a(com.finogeeks.lib.applet.f.c.i0.i.i iVar) {
iVar.a(com.finogeeks.lib.applet.f.c.i0.i.b.REFUSED_STREAM);
}
public boolean a(com.finogeeks.lib.applet.f.c.a aVar, e0 e0Var) {
if (this.n.size() >= this.m || this.k || !com.finogeeks.lib.applet.f.c.i0.a.a.a(this.c.a(), aVar)) {
return false;
}
if (aVar.k().g().equals(e().a().k().g())) {
return true;
}
if (this.h == null || e0Var == null) {
return false;
}
Proxy.Type type = e0Var.b().type();
Proxy.Type type2 = Proxy.Type.DIRECT;
if (type != type2 || this.c.b().type() != type2 || !this.c.d().equals(e0Var.d()) || e0Var.a().d() != com.finogeeks.lib.applet.f.c.i0.k.d.a || !a(aVar.k())) {
return false;
}
try {
aVar.a().a(aVar.k().g(), c().b());
return true;
} catch (SSLPeerUnverifiedException unused) {
return false;
}
}
public boolean a(t tVar) {
if (tVar.k() != this.c.a().k().k()) {
return false;
}
if (tVar.g().equals(this.c.a().k().g())) {
return true;
}
return this.f != null && com.finogeeks.lib.applet.f.c.i0.k.d.a.a(tVar.g(), (X509Certificate) this.f.b().get(0));
}
public boolean a(boolean z10) {
if (this.e.isClosed() || this.e.isInputShutdown() || this.e.isOutputShutdown()) {
return false;
}
if (this.h != null) {
return !r0.a();
}
if (z10) {
try {
int soTimeout = this.e.getSoTimeout();
try {
this.e.setSoTimeout(1);
return !this.i.m();
} finally {
this.e.setSoTimeout(soTimeout);
}
} catch (SocketTimeoutException unused) {
} catch (IOException unused2) {
return false;
}
}
return true;
}
public void b() {
com.finogeeks.lib.applet.f.c.i0.c.a(this.d);
}
public r c() {
return this.f;
}
public boolean d() {
return this.h != null;
}
public e0 e() {
return this.c;
}
public Socket f() {
return this.e;
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Connection{");
sb.append(this.c.a().k().g());
sb.append(":");
sb.append(this.c.a().k().k());
sb.append(", proxy=");
sb.append(this.c.b());
sb.append(" hostAddress=");
sb.append(this.c.d());
sb.append(" cipherSuite=");
r rVar = this.f;
sb.append(rVar != null ? rVar.a() : "none");
sb.append(" protocol=");
sb.append(this.g);
sb.append('}');
return sb.toString();
}
}