360手机助手 v3.3.0版本的 MD5 值为:127c345ad16bbebee6e347381328afd0
以下内容为反编译后的 CloudScanHelper.java 源代码,内容仅作参考
package com.qihoo.appstore.browserdown;
import android.content.Context;
import com.qihoo.appstore.utils.a.b;
import com.qihoo.appstore.utils.aw;
import com.qihoo.appstore.utils.bk;
import com.qihoo.appstore.utils.dc;
import com.qihoo.express.mini.c.e;
import com.qihoo360.mobilesafe.a.a;
import org.json.JSONArray;
import org.json.JSONObject;
public class CloudScanHelper {
private static final String TAG = "CloudScanHelper";
public static int CLOUD_SCAN_SAFE = 0;
public static int CLOUD_SCAN_DANGER = 1;
public static int CLOUD_SCAN_CARE = 2;
public static int CLOUD_SCAN_UNKNOWN = -1;
public class ScanApp {
public int id;
public String md5;
public String url;
private ScanApp() {
}
}
private int a(String str) {
JSONArray jSONArray = new JSONArray(str);
return jSONArray.length() == 1 ? jSONArray.getJSONObject(0).getInt("sign") : CLOUD_SCAN_UNKNOWN;
}
private String a(byte[] bArr) {
return "http://cloudscan.shouji.360.cn/ps.php?id=" + aw.b(dc.N()) + "&os=apk&token=" + aw.b("360+" + aw.a(bArr).toLowerCase() + "-mobile").toLowerCase();
}
private byte[] a(String str, String str2) {
ScanApp scanApp = new ScanApp();
scanApp.id = 1;
scanApp.url = str;
scanApp.md5 = str2.toLowerCase();
new ScanApp[1][0] = scanApp;
JSONObject jSONObject = new JSONObject();
jSONObject.put("id", scanApp.id);
jSONObject.put("url", scanApp.url);
jSONObject.put("md5", scanApp.md5);
JSONArray jSONArray = new JSONArray();
jSONArray.put(0, jSONObject);
String jSONArray2 = jSONArray.toString();
if (a.f5313a) {
bk.b(TAG, "post json is " + jSONArray2);
}
return e.a(jSONArray2);
}
public int a(Context context, String str, String str2) {
if (a.f5313a) {
bk.b(TAG, "CloudScan, url is " + str);
}
if (a.f5313a) {
bk.b(TAG, "CloudScan, md5 is " + str2);
}
try {
byte[] a2 = a(str, str2);
String a3 = a(a2);
if (a.f5313a) {
bk.b(TAG, "server url is " + a3);
}
String a4 = b.a(context, a3, a2);
if (a.f5313a) {
bk.b(TAG, "response is " + a4);
}
return a(a4);
} catch (Exception e) {
return CLOUD_SCAN_UNKNOWN;
}
}
}