导航菜单

页面标题

页面副标题

All File Recovery v1.0.2 - e.java 源代码

正在查看: All File Recovery v1.0.2 应用的 e.java JAVA 源代码文件

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


package D8;

import A9.u;
import B8.C0295h;
import java.math.BigInteger;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Locale;
import java.util.Objects;
import s8.D;
import s8.L;
import s8.e;
import z8.s;

@r8.d
@D8.a
@r8.c
public final class e {
    public static final int a = 4;
    public static final int b = 8;
    public static final char c = '.';
    public static final s8.e e = new e.m(c);
    public static final char d = ':';
    public static final s8.e f = new e.m(d);
    public static final Inet4Address g = (Inet4Address) g("127.0.0.1");
    public static final Inet4Address h = (Inet4Address) g("0.0.0.0");

    public static final class b {
        public String a;

        public b() {
        }

        public b(a aVar) {
        }
    }

    public static final class c {
        public final Inet4Address a;
        public final Inet4Address b;
        public final int c;
        public final int d;

        public c(@xc.a Inet4Address server, @xc.a Inet4Address client, int port, int flags) {
            boolean z = false;
            L.k(port >= 0 && port <= 65535, "port '%s' is out of range (0 <= port <= 0xffff)", port);
            if (flags >= 0 && flags <= 65535) {
                z = true;
            }
            L.k(z, "flags '%s' is out of range (0 <= flags <= 0xffff)", flags);
            this.a = (Inet4Address) D.a(server, e.h);
            this.b = (Inet4Address) D.a(client, e.h);
            this.c = port;
            this.d = flags;
        }

        public Inet4Address a() {
            return this.b;
        }

        public int b() {
            return this.d;
        }

        public int c() {
            return this.c;
        }

        public Inet4Address d() {
            return this.a;
        }
    }

    public static boolean A(Inet6Address ip) {
        byte[] address = ip.getAddress();
        return address[0] == 32 && address[1] == 2;
    }

    public static boolean B(Inet6Address ip) {
        byte b2;
        if (!ip.isIPv4CompatibleAddress()) {
            return false;
        }
        byte[] address = ip.getAddress();
        return (address[12] == 0 && address[13] == 0 && address[14] == 0 && ((b2 = address[15]) == 0 || b2 == 1)) ? false : true;
    }

    public static boolean C(String ipString) {
        return z(ipString, null) != null;
    }

    public static boolean D(Inet6Address ip) {
        if (G(ip)) {
            return false;
        }
        byte[] address = ip.getAddress();
        return (address[8] | 3) == 3 && address[9] == 0 && address[10] == 94 && address[11] == -2;
    }

    public static boolean E(String ipString) {
        byte[] z = z(ipString, null);
        if (z == null || z.length != 16) {
            return false;
        }
        int i = 0;
        while (true) {
            if (i >= 10) {
                for (int i2 = 10; i2 < 12; i2++) {
                    if (z[i2] != -1) {
                        return false;
                    }
                }
                return true;
            }
            if (z[i] != 0) {
                return false;
            }
            i++;
        }
    }

    public static boolean F(InetAddress address) {
        for (byte b2 : address.getAddress()) {
            if (b2 != -1) {
                return false;
            }
        }
        return true;
    }

    public static boolean G(Inet6Address ip) {
        byte[] address = ip.getAddress();
        return address[0] == 32 && address[1] == 1 && address[2] == 0 && address[3] == 0;
    }

    public static boolean H(String ipString) {
        return i(ipString, false) != null;
    }

    public static short I(String ipString, int start, int end) {
        int i = end - start;
        if (i <= 0 || i > 4) {
            throw new NumberFormatException();
        }
        int i2 = 0;
        while (start < end) {
            i2 = (i2 << 4) | Character.digit(ipString.charAt(start), 16);
            start++;
        }
        return (short) i2;
    }

    public static byte J(String ipString, int start, int end) {
        int i = end - start;
        if (i <= 0 || i > 3) {
            throw new NumberFormatException();
        }
        if (i > 1 && ipString.charAt(start) == '0') {
            throw new NumberFormatException();
        }
        int i2 = 0;
        while (start < end) {
            int i3 = i2 * 10;
            int digit = Character.digit(ipString.charAt(start), 10);
            if (digit < 0) {
                throw new NumberFormatException();
            }
            i2 = i3 + digit;
            start++;
        }
        if (i2 <= 255) {
            return (byte) i2;
        }
        throw new NumberFormatException();
    }

    public static String K(Inet6Address ip) {
        NetworkInterface scopedInterface = ip.getScopedInterface();
        if (scopedInterface == null) {
            int scopeId = ip.getScopeId();
            return scopeId != 0 ? android.support.v4.media.b.a("%", scopeId) : "";
        }
        return "%" + scopedInterface.getName();
    }

    @xc.a
    public static byte[] L(String ipString) {
        if (e.i(ipString) + 1 != 4) {
            return null;
        }
        byte[] bArr = new byte[4];
        int i = 0;
        for (int i2 = 0; i2 < 4; i2++) {
            int indexOf = ipString.indexOf(46, i);
            if (indexOf == -1) {
                indexOf = ipString.length();
            }
            try {
                bArr[i2] = J(ipString, i, indexOf);
                i = indexOf + 1;
            } catch (NumberFormatException unused) {
                return null;
            }
        }
        return bArr;
    }

    @xc.a
    public static byte[] M(String ipString) {
        int i = f.i(ipString);
        if (i < 2 || i > 8) {
            return null;
        }
        int i2 = 1;
        int i3 = i + 1;
        int i4 = 8 - i3;
        boolean z = false;
        for (int i5 = 0; i5 < ipString.length() - 1; i5++) {
            if (ipString.charAt(i5) == ':' && ipString.charAt(i5 + 1) == ':') {
                if (z) {
                    return null;
                }
                int i6 = i4 + 1;
                if (i5 == 0) {
                    i6 = i4 + 2;
                }
                if (i5 == ipString.length() - 2) {
                    i6++;
                }
                i4 = i6;
                z = true;
            }
        }
        if (ipString.charAt(0) == ':' && ipString.charAt(1) != ':') {
            return null;
        }
        if (ipString.charAt(ipString.length() - 1) == ':' && ipString.charAt(ipString.length() - 2) != ':') {
            return null;
        }
        if (z && i4 <= 0) {
            return null;
        }
        if (!z && i3 != 8) {
            return null;
        }
        ByteBuffer allocate = ByteBuffer.allocate(16);
        try {
            if (ipString.charAt(0) != ':') {
                i2 = 0;
            }
            while (i2 < ipString.length()) {
                int indexOf = ipString.indexOf(58, i2);
                if (indexOf == -1) {
                    indexOf = ipString.length();
                }
                if (ipString.charAt(i2) == ':') {
                    for (int i7 = 0; i7 < i4; i7++) {
                        allocate.putShort((short) 0);
                    }
                } else {
                    allocate.putShort(I(ipString, i2, indexOf));
                }
                i2 = indexOf + 1;
            }
            return allocate.array();
        } catch (NumberFormatException unused) {
            return null;
        }
    }

    public static String N(InetAddress ip) {
        ip.getClass();
        if (ip instanceof Inet4Address) {
            String hostAddress = ip.getHostAddress();
            Objects.requireNonNull(hostAddress);
            return hostAddress;
        }
        byte[] address = ip.getAddress();
        int[] iArr = new int[8];
        for (int i = 0; i < 8; i++) {
            int i2 = i * 2;
            iArr[i] = E8.l.l((byte) 0, (byte) 0, address[i2], address[i2 + 1]);
        }
        d(iArr);
        return x(iArr) + K((Inet6Address) ip);
    }

    public static BigInteger O(InetAddress address) {
        return new BigInteger(1, address.getAddress());
    }

    public static String P(InetAddress ip) {
        if (!(ip instanceof Inet6Address)) {
            return N(ip);
        }
        return "[" + N(ip) + "]";
    }

    public static int Q(String string, int start, int end) {
        int i = 0;
        while (start < end) {
            if (i > 214748364) {
                return -1;
            }
            int i2 = i * 10;
            int digit = Character.digit(string.charAt(start), 10);
            if (digit < 0) {
                return -1;
            }
            i = i2 + digit;
            start++;
        }
        return i;
    }

    public static InetAddress b(byte[] addr, String scope) {
        try {
            InetAddress byAddress = InetAddress.getByAddress(addr);
            if (scope == null) {
                return byAddress;
            }
            L.e(byAddress instanceof Inet6Address, "Unexpected state, scope should only appear for ipv6");
            Inet6Address inet6Address = (Inet6Address) byAddress;
            int Q = Q(scope, 0, scope.length());
            if (Q != -1) {
                return Inet6Address.getByAddress(inet6Address.getHostAddress(), inet6Address.getAddress(), Q);
            }
            try {
                NetworkInterface byName = NetworkInterface.getByName(scope);
                if (byName != null) {
                    return Inet6Address.getByAddress(inet6Address.getHostAddress(), inet6Address.getAddress(), byName);
                }
                throw j("No such interface: '%s'", scope);
            } catch (SocketException e2) {
                e = e2;
                throw new IllegalArgumentException("No such interface: ".concat(scope), e);
            } catch (UnknownHostException e3) {
                e = e3;
                throw new IllegalArgumentException("No such interface: ".concat(scope), e);
            }
        } catch (UnknownHostException e4) {
            throw new AssertionError(e4);
        }
    }

    public static int c(InetAddress ip) {
        return ((C0295h.b) C0295h.h(q(ip).getAddress())).readInt();
    }

    public static void d(int[] hextets) {
        int i = -1;
        int i2 = -1;
        int i3 = -1;
        for (int i4 = 0; i4 < hextets.length + 1; i4++) {
            if (i4 >= hextets.length || hextets[i4] != 0) {
                if (i3 >= 0) {
                    int i5 = i4 - i3;
                    if (i5 > i) {
                        i2 = i3;
                        i = i5;
                    }
                    i3 = -1;
                }
            } else if (i3 < 0) {
                i3 = i4;
            }
        }
        if (i >= 2) {
            Arrays.fill(hextets, i2, i + i2, -1);
        }
    }

    @xc.a
    public static String e(String ipString) {
        int lastIndexOf = ipString.lastIndexOf(58) + 1;
        String substring = ipString.substring(0, lastIndexOf);
        byte[] L = L(ipString.substring(lastIndexOf));
        if (L == null) {
            return null;
        }
        return substring + Integer.toHexString(((L[0] & 255) << 8) | (L[1] & 255)) + u.c + Integer.toHexString((L[3] & 255) | ((L[2] & 255) << 8));
    }

    public static InetAddress f(InetAddress address) {
        byte[] address2 = address.getAddress();
        int length = address2.length - 1;
        while (length >= 0 && address2[length] == 0) {
            address2[length] = -1;
            length--;
        }
        L.u(length >= 0, "Decrementing %s would wrap.", address);
        address2[length] = (byte) (address2[length] - 1);
        return b(address2, null);
    }

    @J8.a
    public static InetAddress g(String ipString) {
        b bVar = new b();
        byte[] z = z(ipString, bVar);
        if (z != null) {
            return b(z, bVar.a);
        }
        throw j("'%s' is not an IP string literal.", ipString);
    }

    public static InetAddress h(String hostAddr) {
        InetAddress i = i(hostAddr, true);
        if (i != null) {
            return i;
        }
        throw j("Not a valid URI IP literal: '%s'", hostAddr);
    }

    @xc.a
    public static InetAddress i(String hostAddr, boolean parseScope) {
        int i;
        hostAddr.getClass();
        if (hostAddr.startsWith("[") && hostAddr.endsWith("]")) {
            hostAddr = hostAddr.substring(1, hostAddr.length() - 1);
            i = 16;
        } else {
            i = 4;
        }
        b bVar = parseScope ? new b() : null;
        byte[] z = z(hostAddr, bVar);
        if (z == null || z.length != i) {
            return null;
        }
        return b(z, bVar != null ? bVar.a : null);
    }

    public static IllegalArgumentException j(String format, Object... args) {
        return new IllegalArgumentException(String.format(Locale.ROOT, format, args));
    }

    public static InetAddress k(BigInteger address, boolean isIpv6) {
        L.e(address.signum() >= 0, "BigInteger must be greater than or equal to 0");
        int i = isIpv6 ? 16 : 4;
        byte[] byteArray = address.toByteArray();
        byte[] bArr = new byte[i];
        int max = Math.max(0, byteArray.length - i);
        int length = byteArray.length - max;
        int i2 = i - length;
        for (int i3 = 0; i3 < max; i3++) {
            if (byteArray[i3] != 0) {
                throw j("BigInteger cannot be converted to InetAddress because it has more than %d bytes: %s", Integer.valueOf(i), address);
            }
        }
        System.arraycopy(byteArray, max, bArr, i2, length);
        try {
            return InetAddress.getByAddress(bArr);
        } catch (UnknownHostException e2) {
            throw new AssertionError(e2);
        }
    }

    public static Inet4Address l(BigInteger address) {
        return (Inet4Address) k(address, false);
    }

    public static Inet6Address m(BigInteger address) {
        return (Inet6Address) k(address, true);
    }

    public static Inet4Address n(int address) {
        return t(E8.l.F(address));
    }

    public static InetAddress o(byte[] addr) throws UnknownHostException {
        byte[] bArr = new byte[addr.length];
        for (int i = 0; i < addr.length; i++) {
            bArr[i] = addr[(addr.length - i) - 1];
        }
        return InetAddress.getByAddress(bArr);
    }

    public static Inet4Address p(Inet6Address ip) {
        L.u(A(ip), "Address '%s' is not a 6to4 address.", N(ip));
        return t(Arrays.copyOfRange(ip.getAddress(), 2, 6));
    }

    public static Inet4Address q(InetAddress ip) {
        boolean z;
        if (ip instanceof Inet4Address) {
            return (Inet4Address) ip;
        }
        byte[] address = ip.getAddress();
        int i = 0;
        while (true) {
            if (i >= 15) {
                z = true;
                break;
            }
            if (address[i] != 0) {
                z = false;
                break;
            }
            i++;
        }
        if (z && address[15] == 1) {
            return g;
        }
        if (z && address[15] == 0) {
            return h;
        }
        Inet6Address inet6Address = (Inet6Address) ip;
        int b2 = s.B().j(w(inet6Address) ? s(inet6Address).hashCode() : ByteBuffer.wrap(inet6Address.getAddress(), 0, 8).getLong()).b() | (-536870912);
        if (b2 == -1) {
            b2 = -2;
        }
        return t(E8.l.F(b2));
    }

    public static Inet4Address r(Inet6Address ip) {
        L.u(B(ip), "Address '%s' is not IPv4-compatible.", N(ip));
        return t(Arrays.copyOfRange(ip.getAddress(), 12, 16));
    }

    public static Inet4Address s(Inet6Address ip) {
        if (B(ip)) {
            return r(ip);
        }
        if (A(ip)) {
            return p(ip);
        }
        if (G(ip)) {
            return v(ip).b;
        }
        throw j("'%s' has no embedded IPv4 address.", N(ip));
    }

    public static Inet4Address t(byte[] bytes) {
        L.k(bytes.length == 4, "Byte array has invalid length for an IPv4 address: %s != 4.", bytes.length);
        return (Inet4Address) b(bytes, null);
    }

    public static Inet4Address u(Inet6Address ip) {
        L.u(D(ip), "Address '%s' is not an ISATAP address.", N(ip));
        return t(Arrays.copyOfRange(ip.getAddress(), 12, 16));
    }

    public static c v(Inet6Address ip) {
        L.u(G(ip), "Address '%s' is not a Teredo address.", N(ip));
        byte[] address = ip.getAddress();
        Inet4Address t = t(Arrays.copyOfRange(address, 4, 8));
        int readShort = ((C0295h.b) C0295h.i(address, 8)).readShort() & 65535;
        int i = 65535 & (~((C0295h.b) C0295h.i(address, 10)).readShort());
        byte[] copyOfRange = Arrays.copyOfRange(address, 12, 16);
        for (int i2 = 0; i2 < copyOfRange.length; i2++) {
            copyOfRange[i2] = (byte) (~copyOfRange[i2]);
        }
        return new c(t, t(copyOfRange), i, readShort);
    }

    public static boolean w(Inet6Address ip) {
        return B(ip) || A(ip) || G(ip);
    }

    public static String x(int[] hextets) {
        StringBuilder sb2 = new StringBuilder(39);
        int i = 0;
        boolean z = false;
        while (i < hextets.length) {
            boolean z2 = hextets[i] >= 0;
            if (z2) {
                if (z) {
                    sb2.append(d);
                }
                sb2.append(Integer.toHexString(hextets[i]));
            } else if (i == 0 || z) {
                sb2.append("::");
            }
            i++;
            z = z2;
        }
        return sb2.toString();
    }

    public static InetAddress y(InetAddress address) {
        byte[] address2 = address.getAddress();
        int length = address2.length - 1;
        while (true) {
            if (length < 0 || address2[length] != -1) {
                break;
            }
            address2[length] = 0;
            length--;
        }
        L.u(length >= 0, "Incrementing %s would wrap.", address);
        address2[length] = (byte) (address2[length] + 1);
        return b(address2, null);
    }

    @xc.a
    public static byte[] z(java.lang.String r9, D8.e.b r10) {
        throw new UnsupportedOperationException("Method not decompiled: D8.e.z(java.lang.String, D8.e$b):byte[]");
    }
}