百度手机卫士 v8.1.5版本的 MD5 值为:15af71eae74e2f2b5b9f845fe77a4804
以下内容为反编译后的 wf.java 源代码,内容仅作参考
package dxoptimizer;
import android.content.Context;
import android.os.Build;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import java.net.URLEncoder;
public class wf {
private static Context b;
public static boolean a = false;
private static int c = 0;
private static int d = 0;
private static float e = 0.0f;
private static int f = 0;
private static String g = "";
private static String h = "";
private static String i = "";
private static String j = "";
private static String k = "";
private static String l = "";
private static String m = "";
public static void a(Context context) {
if (b == null) {
b = context.getApplicationContext();
}
}
public static int a() {
if (c == 0) {
c = b.getResources().getDisplayMetrics().widthPixels;
}
return c;
}
public static int b() {
if (d == 0) {
d = b.getResources().getDisplayMetrics().heightPixels;
}
return d;
}
public static int c() {
if (f == 0) {
f = b.getResources().getDisplayMetrics().densityDpi;
}
return f;
}
public static String d() {
if (TextUtils.isEmpty(g)) {
g = "Mozilla/5.0 (Linux; U; Android 5.1.8.1; zh-cn; Unknown Build/Unknown) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30";
g = String.valueOf(g) + " hao123/" + e();
g = String.valueOf(g) + "/" + wi.a(URLEncoder.encode(h()));
g = String.valueOf(g) + "/" + URLEncoder.encode("381b");
g = String.valueOf(g) + "/" + wi.a(URLEncoder.encode(wi.a(String.valueOf(f()) + g(), "MD5")));
g = String.valueOf(g) + "/1";
g = String.valueOf(g) + "/" + URLEncoder.encode("5.1.8.1");
g = String.valueOf(g) + "/93";
g = String.valueOf(g) + "/1";
}
return g;
}
public static String e() {
if (TextUtils.isEmpty(h)) {
try {
h = "5.1.8.1 (Baidu; P1 " + Build.VERSION.RELEASE + ")";
} catch (Exception e2) {
}
}
return h;
}
public static String f() {
if (TextUtils.isEmpty(i)) {
if (b == null) {
i = "";
} else {
TelephonyManager telephonyManager = (TelephonyManager) b.getSystemService("phone");
if (b.getPackageManager().checkPermission("android.permission.READ_PHONE_STATE", b.getPackageName()) == 0) {
i = telephonyManager.getDeviceId();
} else {
i = null;
}
}
}
if (TextUtils.isEmpty(i)) {
i = "0";
}
return i;
}
public static String g() {
if (TextUtils.isEmpty(j)) {
try {
j = Settings.System.getString(b.getContentResolver(), "android_id");
} catch (Exception e2) {
}
}
return j;
}
public static String h() {
if (TextUtils.isEmpty(k)) {
k = String.valueOf(Build.MODEL) + "_" + Build.VERSION.RELEASE + "_" + Build.VERSION.SDK_INT + "_" + Build.MANUFACTURER;
}
return k;
}
public static String b(Context context) {
if (TextUtils.isEmpty(l)) {
StringBuilder sb = new StringBuilder();
sb.append("&_hao123_from=android_app&os=android&osbranch=a0");
sb.append("&apiv=5.1.8.1");
sb.append("&IMEI=" + f());
sb.append("&appversion=93");
sb.append("&appversionname=5.1.8.1");
sb.append("&cuid=" + i());
sb.append("&ua=" + a() + "_" + b() + "_android_");
sb.append("5.1.8.1_" + c());
sb.append("&ut=" + Build.MODEL + "_" + Build.VERSION.RELEASE);
sb.append("_" + wi.a() + "_");
sb.append(Build.BRAND.replace("_", ""));
sb.append("&from=1010051a");
sb.append("&cfrom=1010051a");
l = sb.toString().replaceAll(" ", "%20");
}
return l;
}
public static String i() {
if (TextUtils.isEmpty(m)) {
m = wh.a(b).b("base_shared", wh.a, "device_cuid", "", false);
if (TextUtils.isEmpty(m)) {
m = vn.a(b.getApplicationContext());
wh.a(b).a("base_shared", wh.a, "device_cuid", m, false);
}
}
return m;
}
}