Luсky+Рatcher v11.3.3版本的 MD5 值为:fcc08dfa98a57a21951c5463e292fdaf

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


package javaroot.utils;

import java.io.File;
import java.io.RandomAccessFile;
import net.lingala.zip4j.util.InternalZipConstants;
import p037.C2500;

public class C1543 {

    class C1544 {
        C1544() {
        }
    }

    public static void main(String[] strArr) {
        String str;
        boolean z;
        String str2;
        String str3;
        String str4;
        Exception exc;
        String str5;
        ?? r7;
        String str6;
        RandomAccessFile randomAccessFile;
        String str7;
        String str8;
        String str9;
        C2500.m7142(new C1544());
        String str10 = "#Lucky Patcher block Ads start#";
        String str11 = "#Lucky Patcher block Ads finish#";
        String str12 = strArr[0];
        String str13 = strArr[1];
        String str14 = strArr[2];
        try {
            try {
                C2500.m7078("/system", InternalZipConstants.WRITE_MODE);
                C2500.m7094("chmod", "777", "/system/etc/hosts");
                C2500.m7094("chattr", "-ai", "/system/etc/hosts");
                String m6998 = C2500.m6998(str12);
                if (m6998.equals("")) {
                    m6998 = "/data/data/hosts";
                }
                if (!new File(m6998).exists() || new File(m6998).length() != new File(str12).length()) {
                    str = "0644";
                    z = false;
                } else {
                    str = "0644";
                    System.out.println("Hosts to Data");
                    C2500.m7094("chmod", "777", m6998);
                    C2500.m7094("chattr", "-ai", m6998);
                    z = true;
                }
                try {
                    if (!new File(str12).exists()) {
                        C2500.m7101(new File("/system/etc/hosts"), "127.0.0.1       localhost\n");
                    }
                    if (!z) {
                        str5 = "chattr";
                        r7 = new RandomAccessFile(str12, InternalZipConstants.READ_MODE);
                    } else {
                        str5 = "chattr";
                        r7 = new RandomAccessFile(m6998, InternalZipConstants.READ_MODE);
                    }
                    str6 = m6998;
                    r7.seek(0L);
                    randomAccessFile = new RandomAccessFile(str13, InternalZipConstants.WRITE_MODE);
                } catch (Exception e) {
                    e = e;
                    str2 = "no_space_to_data";
                    str3 = str13;
                    str4 = "ro";
                }
            } catch (Exception e2) {
                e2.printStackTrace();
                System.out.println("unknown error");
            }
        } catch (OutOfMemoryError e3) {
            e3.printStackTrace();
            System.out.println("out.of.memory");
        }
        try {
            randomAccessFile.setLength(0L);
            randomAccessFile.seek(0L);
            boolean z2 = true;
            boolean z3 = false;
            while (true) {
                try {
                    String readLine = r7.readLine();
                    if (readLine == null) {
                        break;
                    }
                    try {
                        if (!readLine.contains(str10) && z2) {
                            str9 = str10;
                            randomAccessFile.writeBytes(readLine + "\n");
                            z2 = z2;
                        } else {
                            str9 = str10;
                            z2 = false;
                            z3 = true;
                        }
                        str10 = str9;
                        if (readLine.contains("#Lucky Patcher block Ads finish#")) {
                            z2 = true;
                            z3 = true;
                        }
                    } catch (Exception e4) {
                        exc = e4;
                        str4 = "ro";
                        str2 = "no_space_to_data";
                        str3 = str13;
                        exc.printStackTrace();
                        System.out.println(str2);
                        new File(str3).delete();
                        C2500.m7094("chmod", str, "/system/etc/hosts");
                        C2500.m7078("/system", str4);
                        return;
                    }
                } catch (Exception e5) {
                    e = e5;
                    str4 = "ro";
                    str2 = "no_space_to_data";
                    str3 = str13;
                    exc = e;
                    exc.printStackTrace();
                    System.out.println(str2);
                    new File(str3).delete();
                    C2500.m7094("chmod", str, "/system/etc/hosts");
                    C2500.m7078("/system", str4);
                    return;
                }
            }
            r7.close();
            randomAccessFile.close();
            if (z3) {
                System.out.println("Changes remove from host");
            }
            try {
                System.out.println(C2500.m7078("/system", InternalZipConstants.WRITE_MODE));
                C2500.m7094("chmod", "777", "/system/etc/hosts");
                System.out.println(C2500.m7078("/system", InternalZipConstants.WRITE_MODE));
                try {
                    if (!z) {
                        r7 = str13;
                        try {
                            C2500.m6875(new File((String) r7), new File("/system/etc/hosts"));
                            if (new File((String) r7).length() != new File("/system/etc/hosts").length()) {
                                System.out.println(r7.length());
                                System.out.println(new File("/system/etc/hosts").length());
                                new File(str12).delete();
                                C2500.m6875(new File((String) r7), new File(str6));
                                if (new File((String) r7).length() != new File(str6).length()) {
                                    System.out.println("no_space_to_data");
                                    new File((String) r7).delete();
                                    new File(str6).delete();
                                    C2500.m7101(new File("/system/etc/hosts"), "127.0.0.1       localhost\n");
                                    C2500.m7094("chmod", str, "/system/etc/hosts");
                                    C2500.m7078("/system", "ro");
                                    return;
                                }
                                C2500.m7094("chmod", str, str6);
                                C2500.m7094(str5, "-ai", str6);
                                C2500.m7094("chown", "0.0", str6);
                                C2500.m7094("chown", "0:0", str6);
                                C2500.m7094("ln", "-s", str6, "/system/etc/hosts");
                                new File((String) r7).delete();
                                C2500.m7094("chmod", str, "/system/etc/hosts");
                                C2500.m7078("/system", "ro");
                                str8 = r7;
                            } else {
                                str8 = r7;
                            }
                        } catch (Exception e6) {
                            e = e6;
                            str11 = "127.0.0.1       localhost\n";
                            e.printStackTrace();
                            C2500.m7101(new File("/system/etc/hosts"), str11);
                            str7 = r7;
                            new File(str7).delete();
                            C2500.m7094("chmod", str, "/system/etc/hosts");
                            C2500.m6899();
                        }
                    } else {
                        String str15 = str13;
                        new File(str12).delete();
                        C2500.m6875(new File(str15), new File(str6));
                        if (new File(str15).length() != new File(str6).length()) {
                            System.out.println("no_space_to_data");
                            new File(str15).delete();
                            new File(str6).delete();
                            C2500.m7101(new File("/system/etc/hosts"), "127.0.0.1       localhost\n");
                            C2500.m7094("chmod", str, "/system/etc/hosts");
                            C2500.m7078("/system", "ro");
                            return;
                        }
                        if (new File(str12).length() != new File(str6).length()) {
                            C2500.m7094("chmod", "0777", "/system/etc/hosts");
                            new File(str12).delete();
                            C2500.m7094("chmod", "0777", str6);
                            C2500.m7094(str5, "-ai", str6);
                            C2500.m7094("chown", "0.0", str6);
                            C2500.m7094("chown", "0:0", str6);
                            C2500.m7094("ln", "-s", str6, "/system/etc/hosts");
                            C2500.m7094("chmod", str, str6);
                        } else {
                            C2500.m7094("chmod", str, str6);
                            C2500.m7094(str5, "-ai", str6);
                            C2500.m7094("chown", "0.0", str6);
                            C2500.m7094("chown", "0:0", str6);
                        }
                        new File(str15).delete();
                        C2500.m7094("chmod", str, "/system/etc/hosts");
                        C2500.m7078("/system", "ro");
                        str8 = str15;
                    }
                    System.out.println("host updated!");
                    str7 = str8;
                } catch (Exception e7) {
                    e = e7;
                }
            } catch (Exception e8) {
                e = e8;
                str11 = "127.0.0.1       localhost\n";
                r7 = str13;
            }
            new File(str7).delete();
            C2500.m7094("chmod", str, "/system/etc/hosts");
            C2500.m6899();
        } catch (Exception e9) {
            e = e9;
            str2 = "no_space_to_data";
            str4 = "ro";
        }
    }
}