安全中心 v4.9.2版本的 MD5 值为:d64c0ec7920c532fa6e6d9bb001cf9bf
以下内容为反编译后的 bcn.java 源代码,内容仅作参考
package tcs;
import com.tencent.kingkong.database.SQLiteDatabase;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import org.apache.http.protocol.HTTP;
import org.json.JSONArray;
import org.json.JSONObject;
public final class bcn {
public String OT;
public String Rb;
public String a;
private static String T(List list) {
if (list == null || list.size() == 0) {
return "{events:[]}";
}
JSONObject jSONObject = new JSONObject();
try {
JSONArray jSONArray = new JSONArray();
jSONObject.put("events", jSONArray);
int size = list.size();
for (int i = 0; i < size; i++) {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("eventID", iq(((bcq) list.get(i)).a));
jSONObject2.put("otherMsg", iq(((bcq) list.get(i)).Rb));
jSONObject2.put("createTime", iq(((bcq) list.get(i)).Rc));
jSONObject2.put("subEvent", iq(((bcq) list.get(i)).OT));
jSONArray.put(jSONObject2);
}
return jSONObject.toString();
} catch (Exception e) {
return "{events:[]}";
}
}
private static String U(List list) {
if (list == null || list.size() == 0) {
return "{bases:[]}";
}
JSONObject jSONObject = new JSONObject();
try {
JSONArray jSONArray = new JSONArray();
jSONObject.put("bases", jSONArray);
int size = list.size();
for (int i = 0; i < size; i++) {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("runStartTtime", iq(((bco) list.get(i)).a));
jSONObject2.put("runEndTime", iq(((bco) list.get(i)).OT));
jSONObject2.put("internetAsserssType", iq(((bco) list.get(i)).Rb));
jSONObject2.put("upFlow", ((bco) list.get(i)).d);
jSONObject2.put("downFlow", ((bco) list.get(i)).e);
jSONObject2.put("runFlag", ((bco) list.get(i)).f);
jSONObject2.put("subNetType", ((bco) list.get(i)).cms);
jSONObject2.put("provice", ((bco) list.get(i)).eBM);
jSONObject2.put("city", ((bco) list.get(i)).ahd);
jSONObject2.put("area", ((bco) list.get(i)).l);
jSONObject2.put("address", ((bco) list.get(i)).eBN);
jSONObject2.put("longitude", ((bco) list.get(i)).o);
jSONObject2.put("dimension", ((bco) list.get(i)).eBO);
jSONArray.put(jSONObject2);
}
return jSONObject.toString();
} catch (Exception e) {
return "{bases:[]}";
}
}
private static String X(List list) {
if (list == null || list.size() == 0) {
return "{activities:[]}";
}
JSONObject jSONObject = new JSONObject();
try {
JSONArray jSONArray = new JSONArray();
jSONObject.put("activities", jSONArray);
int size = list.size();
for (int i = 0; i < size; i++) {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("activity", iq(((bcn) list.get(i)).a));
jSONObject2.put("startTime", iq(((bcn) list.get(i)).OT));
jSONObject2.put("endTime", iq(((bcn) list.get(i)).Rb));
jSONArray.put(jSONObject2);
}
return jSONObject.toString();
} catch (Exception e) {
return "{activities:[]}";
}
}
public static String a() {
return new SimpleDateFormat("yyyy-MM-dd").format(new Date());
}
public static String a(String str) {
byte[] bytes;
String str2 = SQLiteDatabase.KeyEmpty;
try {
bytes = str.getBytes(HTTP.UTF_8);
} catch (Exception e) {
bytes = str.getBytes();
}
int length = (3 - (bytes.length % 3)) % 3;
byte[] bArr = new byte[bytes.length + length];
System.arraycopy(bytes, 0, bArr, 0, bytes.length);
for (int i = 0; i < bArr.length; i += 3) {
int i2 = (bArr[i] << 16) + (bArr[i + 1] << 8) + bArr[i + 2];
str2 = String.valueOf(str2) + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((i2 >> 18) & 63) + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((i2 >> 12) & 63) + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((i2 >> 6) & 63) + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i2 & 63);
}
return io(String.valueOf(str2.substring(0, str2.length() - length)) + "==".substring(0, length)).trim();
}
public static String a(List list, List list2, List list3) {
String str = SQLiteDatabase.KeyEmpty;
if (bcu.Xk != null) {
str = bcu.Xk.getPackageName();
}
StringBuilder sb = new StringBuilder();
sb.append("method=reportAllBatchNew&applicationID=").append((int) bcu.fbe).append("&packageName=").append(str).append("&clientImei=").append(bcu.fbf.Rb).append("&clientImsi=").append(bcu.fbf.OT).append("&clientType=").append(bcu.fbf.Rc).append("&clientOsVersion=").append(bcu.fbf.Ri).append("&userNumber=&version=").append(bcu.fbf.cms).append("&pixel=").append(bcu.fbf.Rm).append("&sdkVersion=A2.0.0.9&channel=").append(bcu.d).append("&mac=").append(bcu.fbf.l).append("&deviceId=").append(bcu.fbf.eBN).append("&bases=").append(U(list)).append("&events=").append(T(list3)).append("&flows=").append("{flows:[]}&activities=").append(X(list2));
return sb.toString();
}
public static boolean c(String str) {
try {
return new JSONObject(str).optString("errorcode").equals("00");
} catch (Exception e) {
return false;
}
}
public static String d(Date date) {
return new SimpleDateFormat("yyyyMMdd HH:mm:ss").format(date);
}
public static boolean f(Date date, Date date2) {
Calendar calendar = Calendar.getInstance();
Calendar calendar2 = Calendar.getInstance();
calendar.setTime(date);
calendar2.setTime(date2);
return calendar.compareTo(calendar2) >= 0;
}
private static String io(String str) {
String str2 = SQLiteDatabase.KeyEmpty;
for (int i = 0; i < str.length(); i += 76) {
str2 = String.valueOf(String.valueOf(str2) + str.substring(i, Math.min(str.length(), i + 76))) + "\r\n";
}
return str2;
}
public static Date ip(String str) {
return new SimpleDateFormat("yyyy-MM-dd").parse(str);
}
private static String iq(String str) {
return (str == null || SQLiteDatabase.KeyEmpty.equals(str)) ? SQLiteDatabase.KeyEmpty : str.replaceAll("[\\[\\]\\{\\}\"\"'']", SQLiteDatabase.KeyEmpty).replace(',', (char) 65292).replace('=', (char) 65309).replace('&', (char) 65286);
}
}