360手机助手 v5.2.50版本的 MD5 值为:087c008db9e518cd556c792742e6830c

以下内容为反编译后的 a.java 源代码,内容仅作参考


package com.qihoo.pdown.uitls;

import com.tencent.mm.sdk.modelmsg.WXMediaMessage;
import java.io.PrintWriter;
import java.io.RandomAccessFile;
import java.io.StringWriter;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.UnknownHostException;
import java.util.Collections;
import java.util.Iterator;
import java.util.Vector;

public class a {
    public static volatile String a = "1.1.0.332";
    public static volatile String b = "1.0.0.000";
    public static String c = "d:/pdown/";
    public static String d = c + "log.txt";
    public static boolean e = false;
    public static String f = ".temp";
    public static String g = ".temp!";
    public static String h = ".trt";
    public static volatile boolean i = false;
    public static volatile int j = 18;
    public static volatile String k = "";
    public static volatile int l = 4;
    public static volatile int m = 5;
    public static int n = 60;
    public static int o = 20;
    public static int p = 20;
    public static boolean q = false;
    public static volatile long r = 0;
    public static volatile int s = 0;
    public static volatile int t = 0;
    public static volatile long u = 0;
    public static volatile long v = 0;
    public static volatile int w = 0;
    public static volatile int x = 0;
    public static volatile long y = 0;
    public static volatile int z = 0;
    public static volatile long A = 18874368;
    public static volatile long B = 0;
    public static volatile long C = 0;
    public static volatile long D = 0;
    public static volatile int E = 8082;
    public static volatile int F = 0;
    public static volatile long G = 0;
    public static String H = "tr.p.360.cn";
    public static volatile int I = 8082;
    public static byte[] J = new byte[4];
    public static long K = 0;
    public static int L = 0;
    public static int M = 4;
    public static int N = 15360;
    public static String[] O = {"http://101.199.124.154/index.html", "http://101.199.124.155/index.html", "http://119.188.2.235/index.html", "http://119.188.2.236/index.html"};
    public static r P = new r();
    public static Vector Q = new Vector();
    public static byte[] R = new byte[20];
    public static boolean S = false;
    public static boolean T = false;
    public static boolean U = false;
    static int[] V = {0, 4489, 8978, 12955, 17956, 22445, 25910, 29887, 35912, 40385, 44890, 48851, 51820, 56293, 59774, 63735, 4225, 264, 13203, 8730, 22181, 18220, 30135, 25662, 40137, 36160, 49115, 44626, 56045, 52068, 63999, 59510, 8450, 12427, 528, 5017, 26406, 30383, 17460, 21949, 44362, 48323, 36440, 40913, 60270, 64231, 51324, 55797, 12675, 8202, 4753, 792, 30631, 26158, 21685, 17724, 48587, 44098, 40665, 36688, 64495, 60006, 55549, 51572, 16900, 21389, 24854, 28831, 1056, 5545, 10034, 14011, 52812, 57285, 60766, 64727, 34920, 39393, 43898, 47859, 21125, 17164, 29079, 24606, 5281, 1320, 14259, 9786, 57037, 53060, 64991, 60502, 39145, 35168, 48123, 43634, 25350, 29327, 16404, 20893, 9506, 13483, 1584, 6073, 61262, 65223, 52316, 56789, 43370, 47331, 35448, 39921, 29575, 25102, 20629, 16668, 13731, 9258, 5809, 1848, 65487, 60998, 56541, 52564, 47595, 43106, 39673, 35696, 33800, 38273, 42778, 46739, 49708, 54181, 57662, 61623, 2112, 6601, 11090, 15067, 20068, 24557, 28022, 31999, 38025, 34048, 47003, 42514, 53933, 49956, 61887, 57398, 6337, 2376, 15315, 10842, 24293, 20332, 32247, 27774, 42250, 46211, 34328, 38801, 58158, 62119, 49212, 53685, 10562, 14539, 2640, 7129, 28518, 32495, 19572, 24061, 46475, 41986, 38553, 34576, 62383, 57894, 53437, 49460, 14787, 10314, 6865, 2904, 32743, 28270, 23797, 19836, 50700, 55173, 58654, 62615, 32808, 37281, 41786, 45747, 19012, 23501, 26966, 30943, 3168, 7657, 12146, 16123, 54925, 50948, 62879, 58390, 37033, 33056, 46011, 41522, 23237, 19276, 31191, 26718, 7393, 3432, 16371, 11898, 59150, 63111, 50204, 54677, 41258, 45219, 33336, 37809, 27462, 31439, 18516, 23005, 11618, 15595, 3696, 8185, 63375, 58886, 54429, 50452, 45483, 40994, 37561, 33584, 31687, 27214, 22741, 18780, 15843, 11370, 7921, 3960};
    static long[] W = {0, 1996959894, 3993919788L, 2567524794L, 124634137, 1886057615, 3915621685L, 2657392035L, 249268274, 2044508324, 3772115230L, 2547177864L, 162941995, 2125561021, 3887607047L, 2428444049L, 498536548, 1789927666, 4089016648L, 2227061214L, 450548861, 1843258603, 4107580753L, 2211677639L, 325883990, 1684777152, 4251122042L, 2321926636L, 335633487, 1661365465, 4195302755L, 2366115317L, 997073096, 1281953886, 3579855332L, 2724688242L, 1006888145, 1258607687, 3524101629L, 2768942443L, 901097722, 1119000684, 3686517206L, 2898065728L, 853044451, 1172266101, 3705015759L, 2882616665L, 651767980, 1373503546, 3369554304L, 3218104598L, 565507253, 1454621731, 3485111705L, 3099436303L, 671266974, 1594198024, 3322730930L, 2970347812L, 795835527, 1483230225, 3244367275L, 3060149565L, 1994146192, 31158534, 2563907772L, 4023717930L, 1907459465, 112637215, 2680153253L, 3904427059L, 2013776290, 251722036, 2517215374L, 3775830040L, 2137656763, 141376813, 2439277719L, 3865271297L, 1802195444, 476864866, 2238001368L, 4066508878L, 1812370925, 453092731, 2181625025L, 4111451223L, 1706088902, 314042704, 2344532202L, 4240017532L, 1658658271, 366619977, 2362670323L, 4224994405L, 1303535960, 984961486, 2747007092L, 3569037538L, 1256170817, 1037604311, 2765210733L, 3554079995L, 1131014506, 879679996, 2909243462L, 3663771856L, 1141124467, 855842277, 2852801631L, 3708648649L, 1342533948, 654459306, 3188396048L, 3373015174L, 1466479909, 544179635, 3110523913L, 3462522015L, 1591671054, 702138776, 2966460450L, 3352799412L, 1504918807, 783551873, 3082640443L, 3233442989L, 3988292384L, 2596254646L, 62317068, 1957810842, 3939845945L, 2647816111L, 81470997, 1943803523, 3814918930L, 2489596804L, 225274430, 2053790376, 3826175755L, 2466906013L, 167816743, 2097651377, 4027552580L, 2265490386L, 503444072, 1762050814, 4150417245L, 2154129355L, 426522225, 1852507879, 4275313526L, 2312317920L, 282753626, 1742555852, 4189708143L, 2394877945L, 397917763, 1622183637, 3604390888L, 2714866558L, 953729732, 1340076626, 3518719985L, 2797360999L, 1068828381, 1219638859, 3624741850L, 2936675148L, 906185462, 1090812512, 3747672003L, 2825379669L, 829329135, 1181335161, 3412177804L, 3160834842L, 628085408, 1382605366, 3423369109L, 3138078467L, 570562233, 1426400815, 3317316542L, 2998733608L, 733239954, 1555261956, 3268935591L, 3050360625L, 752459403, 1541320221, 2607071920L, 3965973030L, 1969922972, 40735498, 2617837225L, 3943577151L, 1913087877, 83908371, 2512341634L, 3803740692L, 2075208622, 213261112, 2463272603L, 3855990285L, 2094854071, 198958881, 2262029012L, 4057260610L, 1759359992, 534414190, 2176718541L, 4139329115L, 1873836001, 414664567, 2282248934L, 4279200368L, 1711684554, 285281116, 2405801727L, 4167216745L, 1634467795, 376229701, 2685067896L, 3608007406L, 1308918612, 956543938, 2808555105L, 3495958263L, 1231636301, 1047427035, 2932959818L, 3654703836L, 1088359270, 936918000, 2847714899L, 3736837829L, 1202900863, 817233897, 3183342108L, 3401237130L, 1404277552, 615818150, 3134207493L, 3453421203L, 1423857449, 601450431, 3009837614L, 3294710456L, 1567103746, 711928724, 3020668471L, 3272380065L, 1510334235, 755167117};
    static byte[] X = new byte[1024];
    static boolean Y = false;

    public static boolean a() {
        return false;
    }

    public static boolean b() {
        return false;
    }

    public static int c() {
        return 0;
    }

    public static int d() {
        return 0;
    }

    public static boolean a(Object obj, Object obj2) {
        return obj == obj2 || (obj != null && obj.equals(obj2));
    }

    public static boolean a(int i2, int i3) {
        return i3 - i2 < i2 - i3;
    }

    public static byte[] a(String str) {
        try {
            return InetAddress.getByName(str).getAddress();
        } catch (Exception e2) {
            throw new IllegalArgumentException(str + " is invalid IP");
        }
    }

    public static int a(byte[] bArr) {
        return (bArr[3] & 255) | ((bArr[2] << 8) & 65280) | ((bArr[1] << 16) & 16711680) | ((bArr[0] << 24) & (-16777216));
    }

    public static int b(String str) {
        try {
            return a(a(str));
        } catch (Exception e2) {
            throw new IllegalArgumentException(str + " is invalid IP");
        }
    }

    public static String a(int i2) {
        return String.valueOf((i2 >> 24) & 255) + "." + String.valueOf((i2 >> 16) & 255) + "." + String.valueOf((i2 >> 8) & 255) + "." + String.valueOf((i2 >> 0) & 255);
    }

    public static String a(boolean z2) {
        try {
            Iterator it = Collections.list(NetworkInterface.getNetworkInterfaces()).iterator();
            while (it.hasNext()) {
                for (InetAddress inetAddress : Collections.list(((NetworkInterface) it.next()).getInetAddresses())) {
                    if (!inetAddress.isLoopbackAddress()) {
                        String upperCase = inetAddress.getHostAddress().toUpperCase();
                        boolean matches = upperCase.matches("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}");
                        if (z2) {
                            if (matches) {
                                return upperCase;
                            }
                        } else if (!matches) {
                            int indexOf = upperCase.indexOf(37);
                            return indexOf >= 0 ? upperCase.substring(0, indexOf) : upperCase;
                        }
                    }
                }
            }
        } catch (Exception e2) {
        }
        return "0.0.0.0";
    }

    public static InetAddress c(String str) {
        if (!str.matches("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}")) {
            return null;
        }
        String[] split = str.split("\\.");
        byte[] bArr = new byte[4];
        for (int i2 = 0; i2 < 4; i2++) {
            bArr[i2] = (byte) (Integer.parseInt(split[i2]) & 255);
        }
        try {
            return InetAddress.getByAddress(bArr);
        } catch (UnknownHostException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public static boolean d(String str) {
        int size = Q.size();
        for (int i2 = 0; i2 < size; i2++) {
            if (((String) Q.get(i2)).equals(str)) {
                return true;
            }
        }
        return false;
    }

    public static boolean e(String str) {
        Q.add(str);
        return true;
    }

    public static boolean f(String str) {
        int size = Q.size();
        for (int i2 = 0; i2 < size; i2++) {
            if (((String) Q.get(i2)).equals(str)) {
                Q.remove(i2);
                return true;
            }
        }
        return false;
    }

    public static long e() {
        return System.currentTimeMillis();
    }

    public static int b(int i2) {
        return P.b(i2, System.currentTimeMillis());
    }

    public static boolean a(byte[] bArr, int i2, short s2) {
        int i3 = 0;
        int i4 = s2;
        if (i2 + 2 > bArr.length) {
            return false;
        }
        while (i3 < 2) {
            bArr[(1 - i3) + i2] = new Integer(i4 & 255).byteValue();
            i3++;
            i4 >>= 8;
        }
        return true;
    }

    public static byte[] c(int i2) {
        byte[] bArr = new byte[4];
        for (int i3 = 0; i3 < bArr.length; i3++) {
            bArr[i3] = new Integer(i2 & 255).byteValue();
            i2 >>= 8;
        }
        return bArr;
    }

    public static boolean a(byte[] bArr, int i2, int i3) {
        if (i2 + 4 > bArr.length) {
            return false;
        }
        for (int i4 = 0; i4 < 4; i4++) {
            bArr[i4 + i2] = new Integer(i3 & 255).byteValue();
            i3 >>= 8;
        }
        return true;
    }

    public static boolean b(byte[] bArr, int i2, int i3) {
        if (i2 + 4 > bArr.length) {
            return false;
        }
        for (int i4 = 0; i4 < 4; i4++) {
            bArr[(3 - i4) + i2] = new Integer(i3 & 255).byteValue();
            i3 >>= 8;
        }
        return true;
    }

    public static byte[] a(long j2) {
        byte[] bArr = new byte[8];
        for (int i2 = 0; i2 < bArr.length; i2++) {
            bArr[i2] = new Long(255 & j2).byteValue();
            j2 >>= 8;
        }
        return bArr;
    }

    public static int a(byte[] bArr, int i2) {
        int i3 = bArr[i2 + 3] & 255;
        int i4 = bArr[i2 + 2] & 255;
        int i5 = i3 | (i4 << 8);
        return i5 | ((bArr[i2 + 1] & 255) << 16) | ((bArr[i2 + 0] & 255) << 24);
    }

    public static short b(byte[] bArr, int i2) {
        return (short) (((short) (bArr[i2 + 1] & 255)) | ((short) (((short) (bArr[i2 + 0] & 255)) << 8)));
    }

    public static String g(String str) {
        StringBuffer stringBuffer = new StringBuffer();
        for (int i2 = 0; i2 < str.length(); i2++) {
            char charAt = str.charAt(i2);
            if (charAt >= 0 && charAt <= 255) {
                stringBuffer.append(charAt);
            } else {
                byte[] bArr = new byte[0];
                try {
                    bArr = Character.toString(charAt).getBytes("UTF-8");
                } catch (Exception e2) {
                }
                for (int i3 : bArr) {
                    if (i3 < 0) {
                        i3 += 256;
                    }
                    stringBuffer.append("%" + Integer.toHexString(i3).toUpperCase());
                }
            }
        }
        return stringBuffer.toString();
    }

    public static byte[] h(String str) {
        if (str == null || str.equals("")) {
            return null;
        }
        String upperCase = str.toUpperCase();
        int length = upperCase.length() / 2;
        char[] charArray = upperCase.toCharArray();
        byte[] bArr = new byte[length];
        for (int i2 = 0; i2 < length; i2++) {
            int i3 = i2 * 2;
            bArr[i2] = (byte) (a(charArray[i3 + 1]) | (a(charArray[i3]) << 4));
        }
        return bArr;
    }

    private static byte a(char c2) {
        return (byte) "0123456789ABCDEF".indexOf(c2);
    }

    public static int b(long j2) {
        if (j2 <= 2097152) {
            return 16384;
        }
        if (j2 >= 4294967296L) {
            return 524288;
        }
        int sqrt = (int) Math.sqrt(j2 / 4096.0d);
        for (int i2 = 3; sqrt > 0 && i2 < 16; i2++) {
            if (((WXMediaMessage.THUMB_LENGTH_LIMIT >> i2) & sqrt) > 0) {
                return (WXMediaMessage.THUMB_LENGTH_LIMIT >> i2) * 1024;
            }
        }
        return 16384;
    }

    public static int a(short s2) {
        return 65535 & s2;
    }

    public static String b(byte[] bArr) {
        int i2;
        int i3;
        char[] cArr = new char[40];
        int i4 = 0;
        int i5 = 0;
        while (i5 < 20) {
            byte b2 = (byte) ((bArr[i5] >> 4) & 15);
            if (b2 > 9) {
                i2 = i4 + 1;
                cArr[i4] = (char) ((b2 - 10) + 65);
            } else {
                i2 = i4 + 1;
                cArr[i4] = (char) (b2 + 48);
            }
            byte b3 = (byte) (bArr[i5] & 15);
            if (b3 > 9) {
                i3 = i2 + 1;
                cArr[i2] = (char) ((b3 - 10) + 65);
            } else {
                i3 = i2 + 1;
                cArr[i2] = (char) (b3 + 48);
            }
            i5++;
            i4 = i3;
        }
        return String.valueOf(cArr);
    }

    public static void a(String str, byte[] bArr) {
        char charAt;
        int charAt2;
        int i2 = 0;
        int i3 = 0;
        while (i2 < o * 2) {
            if ('9' >= str.charAt(i2) && str.charAt(i2) >= '0') {
                charAt = (char) ((str.charAt(i2) - '0') << 4);
            } else if ('F' >= str.charAt(i2) && str.charAt(i2) >= 'A') {
                charAt = (char) (((str.charAt(i2) - 'A') + 10) << 4);
            } else if ('f' >= str.charAt(i2) && str.charAt(i2) >= 'a') {
                charAt = (char) (((str.charAt(i2) - 'a') + 10) << 4);
            } else {
                return;
            }
            int i4 = i2 + 1;
            if ('9' >= str.charAt(i4) && str.charAt(i4) >= '0') {
                charAt2 = (char) (str.charAt(i4) - '0');
            } else if ('F' >= str.charAt(i4) && str.charAt(i4) >= 'A') {
                charAt2 = (str.charAt(i4) - 'A') + 10;
            } else if ('f' >= str.charAt(i4) && str.charAt(i4) >= 'a') {
                charAt2 = (str.charAt(i4) - 'a') + 10;
            } else {
                return;
            }
            char c2 = (char) (charAt2 + charAt);
            i2 = i4 + 1;
            bArr[i3] = (byte) c2;
            i3++;
        }
    }

    static void f() {
        for (int i2 = 0; i2 < 256; i2++) {
            System.arraycopy(c((int) ((W[i2] >> 8) + V[255 - i2])), 0, X, i2 * 4, 4);
        }
    }

    public static int c(byte[] bArr, int i2, int i3) {
        if (!Y) {
            Y = true;
            f();
        }
        long j2 = 4294967294L;
        for (int i4 = 0; i4 < i3; i4++) {
            j2 = (j2 >> 8) ^ W[(int) ((bArr[i2] & 255) ^ (255 & j2))];
            i2++;
        }
        return (int) j2;
    }

    public static int a(String str, byte[] bArr, int[] iArr, long[] jArr) {
        int i2 = 0;
        if (bArr == null) {
            return 0;
        }
        try {
            RandomAccessFile randomAccessFile = new RandomAccessFile(str, "r");
            randomAccessFile.seek(0L);
            long readLong = randomAccessFile.readLong();
            int readInt = randomAccessFile.readInt();
            long length = randomAccessFile.length();
            long j2 = ((readInt + 7) / 8) + 16;
            if (length == j2) {
                iArr[0] = (readInt + 7) / 8;
                randomAccessFile.read(bArr, 0, iArr[0]);
                int readInt2 = randomAccessFile.readInt();
                randomAccessFile.close();
                byte[] bArr2 = new byte[(int) (length - 4)];
                byte[] a2 = a(readLong);
                byte[] c2 = c(readInt);
                System.arraycopy(a2, 0, bArr2, 0, 8);
                System.arraycopy(c2, 0, bArr2, 8, 4);
                System.arraycopy(bArr, 0, bArr2, 12, iArr[0]);
                if (e.a(bArr2) == readInt2 && readLong != 0) {
                    jArr[0] = readLong;
                    i2 = 1;
                }
            } else if (length == j2 + 4) {
                int readInt3 = randomAccessFile.readInt();
                iArr[0] = (readInt + 7) / 8;
                randomAccessFile.read(bArr, 0, iArr[0]);
                int readInt4 = randomAccessFile.readInt();
                randomAccessFile.close();
                byte[] bArr3 = new byte[(int) (length - 4)];
                byte[] a3 = a(readLong);
                byte[] c3 = c(readInt);
                byte[] c4 = c(readInt3);
                System.arraycopy(a3, 0, bArr3, 0, 8);
                System.arraycopy(c3, 0, bArr3, 8, 4);
                System.arraycopy(c4, 0, bArr3, 12, 4);
                System.arraycopy(bArr, 0, bArr3, 16, iArr[0]);
                if (e.a(bArr3) == readInt4 && readLong != 0) {
                    jArr[0] = readLong;
                    i2 = 2;
                }
            } else {
                randomAccessFile.close();
            }
            return i2;
        } catch (Exception e2) {
            if (e) {
                e2.printStackTrace(new PrintWriter(new StringWriter()));
            }
            return 0;
        }
    }
}