导航菜单

页面标题

页面副标题

管控平台 v5.2.3.0. - a.java 源代码

正在查看: 管控平台 v5.2.3.0. 应用的 a.java JAVA 源代码文件

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


package com.iflytek.mdmlibrary.a;

import androidx.core.view.MotionEventCompat;
import androidx.core.view.ViewCompat;
import com.iflytek.mdmcommon.LogUtil;
import java.util.regex.Pattern;

public class a {

    private static int[] f968a = {g("1.0.0.1"), 0};
    private static int[] b;
    private static int[] c;
    private static int d;
    private static int e;
    private static int f;

    static {
        f968a[1] = g("126.255.255.254");
        b = new int[]{g("128.0.0.1"), 0};
        b[1] = g("191.255.255.254");
        c = new int[]{g("192.168.0.0"), 0};
        c[1] = g("192.168.255.255");
        d = g("255.0.0.0");
        e = g("255.255.0.0");
        f = g("255.255.255.0");
    }

    public a() {
        g("255.255.255.0");
    }

    public static int a(String str) {
        int g = g(str);
        int[] iArr = c;
        if (g >= iArr[0] && g <= iArr[1]) {
            return 3;
        }
        int[] iArr2 = b;
        if (g >= iArr2[0] && g <= iArr2[1]) {
            return 2;
        }
        int[] iArr3 = f968a;
        return (g < iArr3[0] || g > iArr3[1]) ? 4 : 1;
    }

    public static boolean b(String str, String str2, String str3) {
        if (!i(str) || !i(str2)) {
            return false;
        }
        int g = g(str);
        int g2 = g(str2);
        int g3 = g(str3);
        return (g & g3) == (g2 & g3);
    }

    public static int c(String str, String str2) {
        return g(str) > g(str2) ? -1 : 1;
    }

    public static String d(String str) {
        return k(e(str));
    }

    public static int e(String str) {
        int a2 = a(str);
        return a2 != 1 ? a2 != 2 ? a2 != 3 ? f : f : e : d;
    }

    public static byte[] f(String str) {
        try {
            String[] split = str.split("\\.");
            int length = split.length;
            byte[] bArr = new byte[length];
            for (int i = 0; i < length; i++) {
                bArr[i] = (byte) (Integer.parseInt(split[i]) & 255);
            }
            return bArr;
        } catch (Exception e2) {
            LogUtil.d("getIpV4Bytes:" + e2.getMessage());
            return new byte[4];
        }
    }

    public static int g(String str) {
        byte[] f2 = f(str);
        return ((f2[0] << 24) & ViewCompat.MEASURED_STATE_MASK) | (f2[3] & 255) | ((f2[2] << 8) & MotionEventCompat.ACTION_POINTER_INDEX_MASK) | ((f2[1] << 16) & 16711680);
    }

    public static String h(int i) {
        int i2 = i / 8;
        int i3 = i % 8;
        int i4 = 0;
        for (int i5 = 8; i5 > 8 - i3; i5--) {
            i4 += (int) Math.pow(2.0d, i5 - 1.0d);
        }
        if (i2 == 0) {
            return i4 + ".0.0.0";
        }
        if (i2 == 1) {
            return "255." + i4 + ".0.0";
        }
        if (i2 == 2) {
            return "255.255." + i4 + ".0";
        }
        if (i2 != 3) {
            return i2 == 4 ? "255.255.255.255" : "";
        }
        return "255.255.255." + i4;
    }

    public static boolean i(String str) {
        return j(str, "((\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])){3})");
    }

    private static boolean j(String str, String str2) {
        if (str == null) {
            return false;
        }
        return Pattern.matches(str2, str.trim());
    }

    public static String k(int i) {
        return ((i >> 24) & 255) + "." + ((i >> 16) & 255) + "." + ((i >> 8) & 255) + "." + (i & 255);
    }
}