导航菜单

页面标题

页面副标题

91看片 v1.0.4 - c.java 源代码

正在查看: 91看片 v1.0.4 应用的 c.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package s9;

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.annotation.Nullable;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import p9.b0;
import p9.h;
import p9.i;
import p9.j;
import p9.o;
import p9.p;
import p9.r;
import p9.s;
import p9.u;
import p9.v;
import p9.x;
import p9.z;
import v9.g;
import z9.l;
import z9.s;
import z9.t;

public final class c extends g.j implements h {

    private final i f13902b;

    private final b0 f13903c;

    private Socket f13904d;

    private Socket f13905e;

    private p f13906f;

    private v f13907g;

    private v9.g f13908h;

    private z9.e f13909i;

    private z9.d f13910j;

    public boolean f13911k;

    public int f13912l;

    public int f13913m = 1;

    public final List<Reference<g>> f13914n = new ArrayList();

    public long f13915o = Long.MAX_VALUE;

    public c(i iVar, b0 b0Var) {
        this.f13902b = iVar;
        this.f13903c = b0Var;
    }

    private void e(int i10, int i11, p9.d dVar, o oVar) {
        Proxy b10 = this.f13903c.b();
        this.f13904d = (b10.type() == Proxy.Type.DIRECT || b10.type() == Proxy.Type.HTTP) ? this.f13903c.a().j().createSocket() : new Socket(b10);
        oVar.f(dVar, this.f13903c.d(), b10);
        this.f13904d.setSoTimeout(i11);
        try {
            w9.i.l().h(this.f13904d, this.f13903c.d(), i10);
            try {
                this.f13909i = l.b(l.i(this.f13904d));
                this.f13910j = l.a(l.f(this.f13904d));
            } catch (NullPointerException e10) {
                if ("throw with null exception".equals(e10.getMessage())) {
                    throw new IOException(e10);
                }
            }
        } catch (ConnectException e11) {
            ConnectException connectException = new ConnectException("Failed to connect to " + this.f13903c.d());
            connectException.initCause(e11);
            throw connectException;
        }
    }

    private void f(b bVar) {
        SSLSocket sSLSocket;
        p9.a a10 = this.f13903c.a();
        SSLSocket sSLSocket2 = null;
        try {
            try {
                sSLSocket = (SSLSocket) a10.k().createSocket(this.f13904d, a10.l().l(), a10.l().w(), true);
            } catch (AssertionError e10) {
                e = e10;
            }
        } catch (Throwable th) {
            th = th;
        }
        try {
            j a11 = bVar.a(sSLSocket);
            if (a11.f()) {
                w9.i.l().g(sSLSocket, a10.l().l(), a10.f());
            }
            sSLSocket.startHandshake();
            SSLSession session = sSLSocket.getSession();
            p b10 = p.b(session);
            if (a10.e().verify(a10.l().l(), session)) {
                a10.a().a(a10.l().l(), b10.c());
                String n10 = a11.f() ? w9.i.l().n(sSLSocket) : null;
                this.f13905e = sSLSocket;
                this.f13909i = l.b(l.i(sSLSocket));
                this.f13910j = l.a(l.f(this.f13905e));
                this.f13906f = b10;
                this.f13907g = n10 != null ? v.b(n10) : v.HTTP_1_1;
                w9.i.l().a(sSLSocket);
                return;
            }
            List<Certificate> c10 = b10.c();
            if (c10.isEmpty()) {
                throw new SSLPeerUnverifiedException("Hostname " + a10.l().l() + " not verified (no certificates)");
            }
            X509Certificate x509Certificate = (X509Certificate) c10.get(0);
            throw new SSLPeerUnverifiedException("Hostname " + a10.l().l() + " not verified:\n    certificate: " + p9.f.c(x509Certificate) + "\n    DN: " + x509Certificate.getSubjectDN().getName() + "\n    subjectAltNames: " + y9.d.a(x509Certificate));
        } catch (AssertionError e11) {
            e = e11;
            if (!q9.c.y(e)) {
                throw e;
            }
            throw new IOException(e);
        } catch (Throwable th2) {
            th = th2;
            sSLSocket2 = sSLSocket;
            if (sSLSocket2 != null) {
                w9.i.l().a(sSLSocket2);
            }
            q9.c.f(sSLSocket2);
            throw th;
        }
    }

    private void g(int i10, int i11, int i12, p9.d dVar, o oVar) {
        x i13 = i();
        r h10 = i13.h();
        for (int i14 = 0; i14 < 21; i14++) {
            e(i10, i11, dVar, oVar);
            i13 = h(i11, i12, i13, h10);
            if (i13 == null) {
                return;
            }
            q9.c.f(this.f13904d);
            this.f13904d = null;
            this.f13910j = null;
            this.f13909i = null;
            oVar.d(dVar, this.f13903c.d(), this.f13903c.b(), null);
        }
    }

    private x h(int i10, int i11, x xVar, r rVar) {
        String str = "CONNECT " + q9.c.q(rVar, true) + " HTTP/1.1";
        while (true) {
            u9.a aVar = new u9.a(null, null, this.f13909i, this.f13910j);
            TimeUnit timeUnit = TimeUnit.MILLISECONDS;
            this.f13909i.d().g(i10, timeUnit);
            this.f13910j.d().g(i11, timeUnit);
            aVar.o(xVar.d(), str);
            aVar.a();
            z c10 = aVar.d(false).p(xVar).c();
            long b10 = t9.e.b(c10);
            if (b10 == -1) {
                b10 = 0;
            }
            s k10 = aVar.k(b10);
            q9.c.B(k10, Integer.MAX_VALUE, timeUnit);
            k10.close();
            int e10 = c10.e();
            if (e10 == 200) {
                if (this.f13909i.b().j() && this.f13910j.b().j()) {
                    return null;
                }
                throw new IOException("TLS tunnel buffered too many bytes!");
            }
            if (e10 != 407) {
                throw new IOException("Unexpected response code for CONNECT: " + c10.e());
            }
            x a10 = this.f13903c.a().h().a(this.f13903c, c10);
            if (a10 == null) {
                throw new IOException("Failed to authenticate with proxy");
            }
            if ("close".equalsIgnoreCase(c10.g("Connection"))) {
                return a10;
            }
            xVar = a10;
        }
    }

    private x i() {
        x a10 = new x.a().g(this.f13903c.a().l()).d("CONNECT", null).b("Host", q9.c.q(this.f13903c.a().l(), true)).b("Proxy-Connection", "Keep-Alive").b("User-Agent", q9.d.a()).a();
        x a11 = this.f13903c.a().h().a(this.f13903c, new z.a().p(a10).n(v.HTTP_1_1).g(407).k("Preemptive Authenticate").b(q9.c.f13080c).q(-1L).o(-1L).i("Proxy-Authenticate", "OkHttp-Preemptive").c());
        return a11 != null ? a11 : a10;
    }

    private void j(b bVar, int i10, p9.d dVar, o oVar) {
        if (this.f13903c.a().k() != null) {
            oVar.u(dVar);
            f(bVar);
            oVar.t(dVar, this.f13906f);
            if (this.f13907g == v.HTTP_2) {
                r(i10);
                return;
            }
            return;
        }
        List<v> f10 = this.f13903c.a().f();
        v vVar = v.H2_PRIOR_KNOWLEDGE;
        if (!f10.contains(vVar)) {
            this.f13905e = this.f13904d;
            this.f13907g = v.HTTP_1_1;
        } else {
            this.f13905e = this.f13904d;
            this.f13907g = vVar;
            r(i10);
        }
    }

    private void r(int i10) {
        this.f13905e.setSoTimeout(0);
        v9.g a10 = new g.h(true).d(this.f13905e, this.f13903c.a().l().l(), this.f13909i, this.f13910j).b(this).c(i10).a();
        this.f13908h = a10;
        a10.T();
    }

    @Override
    public void a(v9.g gVar) {
        synchronized (this.f13902b) {
            this.f13913m = gVar.A();
        }
    }

    @Override
    public void b(v9.i iVar) {
        iVar.f(v9.b.REFUSED_STREAM);
    }

    public void c() {
        q9.c.f(this.f13904d);
    }

    public void d(int r17, int r18, int r19, int r20, boolean r21, p9.d r22, p9.o r23) {
        throw new UnsupportedOperationException("Method not decompiled: s9.c.d(int, int, int, int, boolean, p9.d, p9.o):void");
    }

    public p k() {
        return this.f13906f;
    }

    public boolean l(p9.a aVar, @Nullable b0 b0Var) {
        if (this.f13914n.size() >= this.f13913m || this.f13911k || !q9.a.f13076a.g(this.f13903c.a(), aVar)) {
            return false;
        }
        if (aVar.l().l().equals(p().a().l().l())) {
            return true;
        }
        if (this.f13908h == null || b0Var == null || b0Var.b().type() != Proxy.Type.DIRECT || this.f13903c.b().type() != Proxy.Type.DIRECT || !this.f13903c.d().equals(b0Var.d()) || b0Var.a().e() != y9.d.f17081a || !s(aVar.l())) {
            return false;
        }
        try {
            aVar.a().a(aVar.l().l(), k().c());
            return true;
        } catch (SSLPeerUnverifiedException unused) {
            return false;
        }
    }

    public boolean m(boolean z10) {
        if (this.f13905e.isClosed() || this.f13905e.isInputShutdown() || this.f13905e.isOutputShutdown()) {
            return false;
        }
        v9.g gVar = this.f13908h;
        if (gVar != null) {
            return gVar.y(System.nanoTime());
        }
        if (z10) {
            try {
                int soTimeout = this.f13905e.getSoTimeout();
                try {
                    this.f13905e.setSoTimeout(1);
                    return !this.f13909i.j();
                } finally {
                    this.f13905e.setSoTimeout(soTimeout);
                }
            } catch (SocketTimeoutException unused) {
            } catch (IOException unused2) {
                return false;
            }
        }
        return true;
    }

    public boolean n() {
        return this.f13908h != null;
    }

    public t9.c o(u uVar, s.a aVar, g gVar) {
        if (this.f13908h != null) {
            return new v9.f(uVar, aVar, gVar, this.f13908h);
        }
        this.f13905e.setSoTimeout(aVar.a());
        t d10 = this.f13909i.d();
        long a10 = aVar.a();
        TimeUnit timeUnit = TimeUnit.MILLISECONDS;
        d10.g(a10, timeUnit);
        this.f13910j.d().g(aVar.b(), timeUnit);
        return new u9.a(uVar, gVar, this.f13909i, this.f13910j);
    }

    public b0 p() {
        return this.f13903c;
    }

    public Socket q() {
        return this.f13905e;
    }

    public boolean s(r rVar) {
        if (rVar.w() != this.f13903c.a().l().w()) {
            return false;
        }
        if (rVar.l().equals(this.f13903c.a().l().l())) {
            return true;
        }
        return this.f13906f != null && y9.d.f17081a.c(rVar.l(), (X509Certificate) this.f13906f.c().get(0));
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("Connection{");
        sb.append(this.f13903c.a().l().l());
        sb.append(":");
        sb.append(this.f13903c.a().l().w());
        sb.append(", proxy=");
        sb.append(this.f13903c.b());
        sb.append(" hostAddress=");
        sb.append(this.f13903c.d());
        sb.append(" cipherSuite=");
        p pVar = this.f13906f;
        sb.append(pVar != null ? pVar.a() : "none");
        sb.append(" protocol=");
        sb.append(this.f13907g);
        sb.append('}');
        return sb.toString();
    }
}