Luсky+Рatcher v11.3.3版本的 MD5 值为:fcc08dfa98a57a21951c5463e292fdaf
以下内容为反编译后的 C1660.java 源代码,内容仅作参考
package javaroot.utils;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.RandomAccessFile;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import net.lingala.zip4j.util.InternalZipConstants;
import p037.C2500;
public class C1660 {
private static String f5853 = "/data/dalvik-cache/data@app@zamenitetodelo-1.apk@classes.dex";
class C1661 {
C1661() {
}
}
public static void main(String[] strArr) {
C2500.m7142(new C1661());
String[] split = strArr[1].split(" ");
String[] split2 = strArr[2].split(" ");
int length = split.length;
byte[] bArr = new byte[length];
int length2 = split2.length;
byte[] bArr2 = new byte[length2];
int length3 = split.length;
byte[] bArr3 = new byte[length3];
int length4 = split2.length;
byte[] bArr4 = new byte[length4];
if (length4 == length3 && length == length2 && length2 > 3 && length > 3) {
byte b = 0;
int i = 0;
boolean z = false;
while (i < split.length) {
if (split[i].contains("*") && !split[i].contains("**")) {
split[i] = "00";
z = true;
}
if (split2[i].contains("*") && !split2[i].contains("**")) {
split2[i] = "00";
z = true;
}
if (!split[i].contains("**") && !split[i].contains("??")) {
bArr3[i] = b;
} else {
split[i] = "00";
bArr3[i] = 1;
}
bArr[i] = Integer.valueOf(split[i], 16).byteValue();
if (!split2[i].contains("**") && !split2[i].contains("??")) {
bArr4[i] = 1;
} else {
split2[i] = "00";
bArr4[i] = 0;
}
bArr2[i] = Integer.valueOf(split2[i], 16).byteValue();
i++;
b = 0;
}
if (!z) {
String replace = f5853.replace("zamenitetodelo", strArr[0]);
try {
File file = new File(replace);
if (!file.exists()) {
file = new File(replace.replace("-1", "-2"));
}
File file2 = new File(replace.replace("-1", ""));
if (!file.exists()) {
file = file2;
}
String replace2 = replace.replace("data@app", "mnt@asec").replace(".apk@classes.dex", "@pkg.apk@classes.dex");
File file3 = new File(replace2);
if (file3.exists()) {
file = file3;
}
File file4 = new File(replace2.replace("-1", "-2"));
if (file4.exists()) {
file = file4;
}
File file5 = new File(replace2.replace("-1", ""));
if (file5.exists()) {
file = file5;
}
if (file.exists()) {
FileChannel channel = new RandomAccessFile(file, InternalZipConstants.WRITE_MODE).getChannel();
MappedByteBuffer map = channel.map(FileChannel.MapMode.READ_WRITE, 0L, (int) channel.size());
boolean z2 = false;
while (map.hasRemaining()) {
try {
int position = map.position();
byte b2 = map.get();
if (b2 == bArr[0]) {
if (bArr4[0] == 0) {
bArr2[0] = b2;
}
map.position(position + 1);
byte b3 = map.get();
int i2 = 1;
while (true) {
if (b3 == bArr[i2] || bArr3[i2] == 1) {
if (bArr4[i2] == 0) {
bArr2[i2] = b3;
}
i2++;
if (i2 == length) {
map.position(position);
map.put(bArr2);
map.force();
System.out.println("Offset in file:" + Integer.toHexString(position) + " - Patch done!\n");
z2 = true;
break;
}
b3 = map.get();
}
}
}
map.position(position + 1);
} catch (Exception e) {
System.out.println("" + e);
}
}
channel.close();
if (!z2) {
System.out.println("Error: Pattern not found!\nor patch is already applied?!\n");
}
} else {
throw new FileNotFoundException();
}
} catch (FileNotFoundException unused) {
System.out.println("Error: Program files are not found!\n\nCheck the location dalvik-cache to solve problems!\n\nDefault: /data/dalvik-cache/*");
} catch (Exception unused2) {
}
} else {
System.out.println("Error: Pattern not valid!\n\nPattern can not be \"*4\" or \"A*\", etc.\n\n It can only be ** ");
}
} else {
System.out.println("Error: Original & Replace hex-string not valid!\n\nOriginal.hex.length != Replacmant.hex.length.\nOR\nLength of hex-string < 4");
}
C2500.m6899();
}
}