导航菜单

页面标题

页面副标题

万能钥匙 v1.1.23 - c.java 源代码

正在查看: 万能钥匙 v1.1.23 应用的 c.java JAVA 源代码文件

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


package nm0;

import java.io.IOException;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.logging.Level;
import java.util.logging.Logger;
import nm0.a;
import nm0.d;
import rm0.a;
import um0.e;
import zm0.f;

public class c extends nm0.a {
    public static final List<um0.d> n = new CopyOnWriteArrayList();
    public static final Set<Inet4Address> o;
    public static final Set<Inet6Address> p;
    public static final Set<String> q;
    public final Set<InetAddress> j;
    public boolean k;
    public boolean l;
    public boolean m;

    public static class a {
        public static final int[] a;
        public static final int[] b;

        static {
            int[] iArr = new int[a.d.values().length];
            b = iArr;
            try {
                iArr[a.d.NO_ERROR.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                b[a.d.NX_DOMAIN.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            int[] iArr2 = new int[a.b.values().length];
            a = iArr2;
            try {
                iArr2[a.b.v4v6.ordinal()] = 1;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                a[a.b.v6v4.ordinal()] = 2;
            } catch (NoSuchFieldError unused4) {
            }
            try {
                a[a.b.v4only.ordinal()] = 3;
            } catch (NoSuchFieldError unused5) {
            }
            try {
                a[a.b.v6only.ordinal()] = 4;
            } catch (NoSuchFieldError unused6) {
            }
        }
    }

    static {
        CopyOnWriteArraySet copyOnWriteArraySet = new CopyOnWriteArraySet();
        o = copyOnWriteArraySet;
        p = new CopyOnWriteArraySet();
        i(um0.b.d);
        i(um0.c.d);
        i(e.d);
        try {
            copyOnWriteArraySet.add(zm0.e.a("8.8.8.8"));
        } catch (IllegalArgumentException e) {
            nm0.a.h.log(Level.WARNING, "Could not add static IPv4 DNS Server", (Throwable) e);
        }
        try {
            p.add(zm0.e.b("[2001:4860:4860::8888]"));
        } catch (IllegalArgumentException e2) {
            nm0.a.h.log(Level.WARNING, "Could not add static IPv6 DNS Server", (Throwable) e2);
        }
        q = Collections.newSetFromMap(new ConcurrentHashMap(4));
    }

    public c(b bVar) {
        super(bVar);
        this.j = Collections.newSetFromMap(new ConcurrentHashMap(4));
        this.k = false;
        this.l = false;
        this.m = true;
    }

    public static void i(um0.d dVar) {
        if (!dVar.l()) {
            nm0.a.h.fine("Not adding " + dVar.getName() + " as it is not available.");
            return;
        }
        List<um0.d> list = n;
        synchronized (list) {
            ArrayList arrayList = new ArrayList(list.size() + 1);
            arrayList.addAll(list);
            arrayList.add(dVar);
            Collections.sort(arrayList);
            list.clear();
            list.addAll(arrayList);
        }
    }

    public static java.util.List<java.lang.String> j() {
        throw new UnsupportedOperationException("Method not decompiled: nm0.c.j():java.util.List");
    }

    public static List<InetAddress> k() {
        InetAddress byName;
        List<String> j = j();
        if (j == null) {
            return new ArrayList();
        }
        a.b bVar = nm0.a.i;
        ArrayList arrayList = bVar.a ? new ArrayList(j.size()) : null;
        ArrayList arrayList2 = bVar.b ? new ArrayList(j.size()) : null;
        int i = 0;
        for (String str : j) {
            try {
                byName = InetAddress.getByName(str);
            } catch (UnknownHostException e) {
                nm0.a.h.log(Level.SEVERE, "Could not transform '" + str + "' to InetAddress", (Throwable) e);
            }
            if (!(byName instanceof Inet4Address)) {
                if (!(byName instanceof Inet6Address)) {
                    throw new AssertionError("The address '" + byName + "' is neither of type Inet(4|6)Address");
                }
                if (bVar.b) {
                    arrayList2.add((Inet6Address) byName);
                }
            } else if (bVar.a) {
                arrayList.add((Inet4Address) byName);
            }
            i++;
        }
        ArrayList arrayList3 = new ArrayList(i);
        int i2 = a.a[bVar.ordinal()];
        if (i2 == 1) {
            arrayList3.addAll(arrayList);
            arrayList3.addAll(arrayList2);
        } else if (i2 == 2) {
            arrayList3.addAll(arrayList2);
            arrayList3.addAll(arrayList);
        } else if (i2 == 3) {
            arrayList3.addAll(arrayList);
        } else if (i2 == 4) {
            arrayList3.addAll(arrayList2);
        }
        return arrayList3;
    }

    @Override
    public a.b c(a.b bVar) {
        bVar.v(true);
        bVar.s().h(this.e.b()).g(this.k);
        return bVar;
    }

    @Override
    public tm0.c e(a.b bVar) throws IOException {
        int i;
        rm0.a r = c(bVar).r();
        b bVar2 = this.d;
        tm0.a a2 = bVar2 == null ? null : bVar2.a(r);
        if (a2 != null) {
            return a2;
        }
        List<InetAddress> n2 = n();
        ArrayList arrayList = new ArrayList(n2.size());
        for (InetAddress inetAddress : n2) {
            if (this.j.contains(inetAddress)) {
                nm0.a.h.finer("Skipping " + inetAddress + " because it was marked as \"recursion not available\"");
            } else {
                try {
                    tm0.c f = f(r, inetAddress);
                    rm0.a aVar = f.c;
                    if (aVar.h) {
                        if (this.l || (i = a.b[aVar.c.ordinal()]) == 1 || i == 2) {
                            return f;
                        }
                        String str = "Response from " + inetAddress + " asked for " + r.h() + " with error code: " + aVar.c + '.';
                        Logger logger = nm0.a.h;
                        if (!logger.isLoggable(Level.FINE)) {
                            str = str + "\n" + aVar;
                        }
                        logger.warning(str);
                        arrayList.add(new d.a(r, f));
                    } else if (this.j.add(inetAddress)) {
                        nm0.a.h.warning("The DNS server " + inetAddress + " returned a response without the \"recursion available\" (RA) flag set. This likely indicates a misconfiguration because the server is not suitable for DNS resolution");
                    }
                } catch (IOException e) {
                    arrayList.add(e);
                }
            }
        }
        f.b(arrayList);
        throw new d.c(r);
    }

    public InetAddress l() {
        return (InetAddress) zm0.c.a(p, this.c);
    }

    public InetAddress m() {
        return (InetAddress) zm0.c.a(o, this.c);
    }

    public final List<InetAddress> n() {
        InetAddress m;
        InetAddress l;
        List<InetAddress> k = k();
        if (this.m) {
            int i = a.a[this.f.ordinal()];
            if (i == 1) {
                m = m();
                l = l();
            } else if (i != 2) {
                l = null;
                if (i == 3) {
                    m = m();
                } else {
                    if (i != 4) {
                        throw new AssertionError("Unknown ipVersionSetting: " + this.f);
                    }
                    m = l();
                }
            } else {
                m = l();
                l = m();
            }
            k.add(m);
            if (l != null) {
                k.add(l);
            }
        }
        return k;
    }
}