QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 Cwhile.java 源代码,内容仅作参考
package com.tencent.tfd.sdk.wxa;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Process;
import android.text.TextUtils;
import android.util.Base64;
import com.xiaomi.mipush.sdk.Constants;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.regex.Pattern;
import org.xwalk.core.XWalkEnvironment;
public class Cwhile {
public static final String Tb = Cconst.get(Cconst.pa);
public static final String _b = Cconst.get(Cconst.qa);
public static final String ac = Cconst.get(Cconst.ra);
public static final String bc = Cconst.get(Cconst.sa);
public static final String cc = Cconst.get(Cconst.ta);
public static long dc = 0;
public static final String[] ec = {"^/data/user/\\d+$", "^/data/data$"};
static class Cdo {
public final String Zb;
public final boolean match;
public Cdo(boolean z, String str) {
this.match = z;
this.Zb = str;
}
}
public static String E() {
StringBuilder b2 = com.tencent.tfd.sdk.wxa.Cdo.b("");
b2.append(dc);
return b2.toString();
}
public static boolean F() {
try {
return 999 == Process.myUid() / 100000;
} catch (Throwable unused) {
return false;
}
}
public static String b(Context context, String str) {
String str2;
StringBuilder sb = new StringBuilder();
sb.append(str);
sb.append("_");
try {
str2 = context.getPackageManager().getApplicationInfo(str, 0).sourceDir;
} catch (PackageManager.NameNotFoundException unused) {
str2 = "";
}
try {
sb.append(Cvoid.a(new File(str2)).get(0));
} catch (Throwable unused2) {
sb.append("");
}
sb.append("_");
long j = -1;
if (!TextUtils.isEmpty(str2)) {
File file = new File(str2);
if (file.exists()) {
j = file.length();
}
}
sb.append(j);
sb.append("_");
sb.append(Process.myUid());
return sb.toString();
}
public static String m(Context context) {
boolean z;
Cdo cdo;
boolean z2;
int a2;
FileReader fileReader;
BufferedReader bufferedReader;
String str;
String packageName;
boolean z3;
Cdo cdo2;
int indexOf;
String substring;
String readLine;
String str2;
int lastIndexOf;
boolean z4;
boolean z5;
Cdo cdo3;
String str3;
String str4;
String str5;
Class<?> cls;
Object systemService;
int a3;
Iterator it;
StringBuilder sb = new StringBuilder();
long currentTimeMillis = System.currentTimeMillis();
ArrayList arrayList = new ArrayList();
File parentFile = context.getApplicationContext().getFilesDir().getParentFile();
if (parentFile == null) {
cdo = new Cdo(false, "");
} else {
File parentFile2 = parentFile.getParentFile();
if (parentFile2 == null) {
cdo = new Cdo(false, "");
} else {
String[] strArr = ec;
int length = strArr.length;
int i = 0;
while (true) {
if (i >= length) {
z = true;
break;
}
if (Pattern.compile(strArr[i]).matcher(parentFile2.getAbsolutePath()).find()) {
z = false;
break;
}
i++;
}
String absolutePath = parentFile.getAbsolutePath();
String packageName2 = context.getPackageName();
String[] split = absolutePath.split("/", 6);
if (absolutePath.startsWith("/data/data/") && split.length >= 4 && !TextUtils.isEmpty(split[3])) {
packageName2 = split[3];
} else if (absolutePath.startsWith("/data/user/") && split.length >= 5 && !TextUtils.isEmpty(split[4])) {
packageName2 = split[4];
}
cdo = (!z || packageName2.equals(context.getPackageName())) ? new Cdo(z, "") : new Cdo(z, b(context, packageName2));
}
}
if (!cdo.match || TextUtils.isEmpty(cdo.Zb)) {
z2 = false;
a2 = Cvoid.a(0, false, 0);
} else {
a2 = Cvoid.a(0, true, 0);
Cstrictfp cstrictfp = new Cstrictfp();
cstrictfp.l = Tb + ac;
cstrictfp.m = cdo.Zb;
arrayList.add(cstrictfp);
z2 = false;
}
Context applicationContext = context.getApplicationContext();
if (applicationContext == null) {
cdo2 = new Cdo(z2, "");
} else {
int i2 = -1;
try {
fileReader = new FileReader("/proc/self/maps");
try {
bufferedReader = new BufferedReader(fileReader);
} catch (Throwable th) {
th = th;
bufferedReader = null;
try {
th.printStackTrace();
Cvoid.a(fileReader);
Cvoid.a(bufferedReader);
str = null;
packageName = applicationContext.getPackageName();
if (!TextUtils.isEmpty(str)) {
}
z3 = false;
if (z3) {
}
int a4 = Cvoid.a(a2, cdo2.match, 1);
if (cdo2.match) {
}
if (Build.VERSION.SDK_INT < 17) {
}
a3 = Cvoid.a(a4, cdo3.match, 2);
if (cdo3.match) {
}
if (a3 > 0) {
}
dc = System.currentTimeMillis() - currentTimeMillis;
it = arrayList.iterator();
while (it.hasNext()) {
}
return sb.toString();
} finally {
Cvoid.a(fileReader);
Cvoid.a(bufferedReader);
}
}
} catch (Throwable th2) {
th = th2;
fileReader = null;
}
while (true) {
try {
readLine = bufferedReader.readLine();
} catch (Throwable th3) {
th = th3;
th.printStackTrace();
Cvoid.a(fileReader);
Cvoid.a(bufferedReader);
str = null;
packageName = applicationContext.getPackageName();
if (!TextUtils.isEmpty(str)) {
}
z3 = false;
if (z3) {
}
int a42 = Cvoid.a(a2, cdo2.match, 1);
if (cdo2.match) {
}
if (Build.VERSION.SDK_INT < 17) {
}
a3 = Cvoid.a(a42, cdo3.match, 2);
if (cdo3.match) {
}
if (a3 > 0) {
}
dc = System.currentTimeMillis() - currentTimeMillis;
it = arrayList.iterator();
while (it.hasNext()) {
}
return sb.toString();
}
if (readLine == null) {
break;
}
int indexOf2 = readLine.indexOf(47);
if (indexOf2 != i2) {
String trim = readLine.substring(indexOf2).trim();
if (Build.VERSION.SDK_INT < 23) {
if (trim.startsWith("/data/dalvik-cache/") && trim.endsWith(".apk@classes.dex") && (lastIndexOf = trim.lastIndexOf(47)) != -1) {
String replace = trim.substring(lastIndexOf, trim.length() - 12).replace('@', '/');
if (replace.startsWith("/data/app/")) {
File file = new File(replace);
if (!XWalkEnvironment.XWALK_CORE_APK_NAME.equals(file.getName())) {
str2 = file.getName();
} else if (file.getParentFile() != null) {
str2 = file.getParentFile().getName();
}
}
}
i2 = -1;
} else {
if (trim.startsWith("/data/app/") && trim.endsWith("/base.odex")) {
String[] split2 = trim.split("/");
if (split2.length >= 7) {
str2 = split2[3];
break;
}
}
i2 = -1;
}
packageName = applicationContext.getPackageName();
if (!TextUtils.isEmpty(str) && (indexOf = str.indexOf(Constants.ACCEPT_TIME_SEPARATOR_SERVER)) != -1) {
substring = str.substring(0, indexOf);
if (!TextUtils.isEmpty(substring)) {
File file2 = new File("/data/data/" + substring);
if (!file2.exists() || !file2.canWrite()) {
substring = packageName;
}
z3 = !TextUtils.equals(packageName, substring);
packageName = substring;
cdo2 = z3 ? new Cdo(z3, b(context, packageName)) : new Cdo(z3, "");
}
}
z3 = false;
if (z3) {
}
}
}
str = str2;
packageName = applicationContext.getPackageName();
if (!TextUtils.isEmpty(str)) {
substring = str.substring(0, indexOf);
if (!TextUtils.isEmpty(substring)) {
}
}
z3 = false;
if (z3) {
}
}
int a422 = Cvoid.a(a2, cdo2.match, 1);
if (cdo2.match) {
Cstrictfp cstrictfp2 = new Cstrictfp();
cstrictfp2.l = Tb + bc;
cstrictfp2.m = cdo2.Zb;
arrayList.add(cstrictfp2);
}
if (Build.VERSION.SDK_INT < 17) {
cdo3 = new Cdo(false, "");
} else {
StringBuilder sb2 = new StringBuilder();
if ("HUAWEI".equalsIgnoreCase(Build.BRAND)) {
try {
cls = Class.forName("android.os.UserManager");
Field field = context.getClass().getField("USER_SERVICE");
field.setAccessible(true);
systemService = context.getSystemService((String) field.get(context));
} catch (Throwable unused) {
}
try {
if (systemService != null) {
Method method = cls.getMethod("getUserName", new Class[0]);
if (method != null) {
z5 = true;
try {
method.setAccessible(true);
str5 = (String) method.invoke(systemService, new Object[0]);
} catch (Throwable unused2) {
}
String str6 = new String(Base64.decode("5YiG6Lqr5bqU55So", 0));
if (!TextUtils.isEmpty(str5) && str6.equals(str5)) {
str3 = "HuaWei";
try {
sb2.append(str3);
} catch (Throwable unused3) {
z4 = true;
z5 = z4;
cdo3 = new Cdo(z5, sb2.toString());
a3 = Cvoid.a(a422, cdo3.match, 2);
if (cdo3.match) {
}
if (a3 > 0) {
}
dc = System.currentTimeMillis() - currentTimeMillis;
it = arrayList.iterator();
while (it.hasNext()) {
}
return sb.toString();
}
}
z5 = false;
}
}
String str62 = new String(Base64.decode("5YiG6Lqr5bqU55So", 0));
if (!TextUtils.isEmpty(str5)) {
str3 = "HuaWei";
sb2.append(str3);
}
z5 = false;
} catch (Throwable unused4) {
z4 = false;
z5 = z4;
cdo3 = new Cdo(z5, sb2.toString());
a3 = Cvoid.a(a422, cdo3.match, 2);
if (cdo3.match) {
}
if (a3 > 0) {
}
dc = System.currentTimeMillis() - currentTimeMillis;
it = arrayList.iterator();
while (it.hasNext()) {
}
return sb.toString();
}
z5 = true;
str5 = "";
} else {
z5 = true;
if ("xiaomi".equalsIgnoreCase(Build.BRAND)) {
if (F()) {
str4 = "XiaoMi";
sb2.append(str4);
cdo3 = new Cdo(z5, sb2.toString());
}
z5 = false;
} else if ("oppo".equalsIgnoreCase(Build.BRAND)) {
if (F()) {
str4 = "OPPO";
sb2.append(str4);
cdo3 = new Cdo(z5, sb2.toString());
}
z5 = false;
} else {
if ("vivo".equalsIgnoreCase(Build.BRAND)) {
if (F()) {
str4 = "VIVO_A";
sb2.append(str4);
cdo3 = new Cdo(z5, sb2.toString());
} else {
String str7 = new String(Cpackage.f("/proc/self/mountinfo"));
StringBuilder sb3 = new StringBuilder();
sb3.append(context.getApplicationContext().getPackageName());
sb3.append("_cloned");
if (str7.contains(sb3.toString())) {
str3 = "VIVO_B";
sb2.append(str3);
}
}
}
z5 = false;
}
}
cdo3 = new Cdo(z5, sb2.toString());
}
a3 = Cvoid.a(a422, cdo3.match, 2);
if (cdo3.match) {
Cstrictfp cstrictfp3 = new Cstrictfp();
cstrictfp3.l = Tb + cc;
cstrictfp3.m = cdo3.Zb;
arrayList.add(cstrictfp3);
}
if (a3 > 0) {
Cstrictfp cstrictfp4 = new Cstrictfp();
cstrictfp4.l = Tb + _b;
cstrictfp4.m = com.tencent.tfd.sdk.wxa.Cdo.a("", a3);
arrayList.add(cstrictfp4);
}
dc = System.currentTimeMillis() - currentTimeMillis;
it = arrayList.iterator();
while (it.hasNext()) {
Cstrictfp cstrictfp5 = (Cstrictfp) it.next();
sb.append(cstrictfp5.l);
sb.append(Constants.COLON_SEPARATOR);
sb.append(cstrictfp5.m);
sb.append(Constants.ACCEPT_TIME_SEPARATOR_SP);
}
return sb.toString();
}
}