正在查看: 安博 v1.0.0 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 安博 v1.0.0 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package d;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build;
import android.text.TextUtils;
import android.util.Base64;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import io.dcloud.common.DHInterface.IApp;
import io.dcloud.common.DHInterface.IWebview;
import io.dcloud.common.adapter.util.AndroidResources;
import io.dcloud.common.adapter.util.DeviceInfo;
import io.dcloud.common.adapter.util.Logger;
import io.dcloud.common.adapter.util.PlatformUtil;
import io.dcloud.common.adapter.util.SP;
import io.dcloud.common.constant.DataInterface;
import io.dcloud.common.util.ADUtils;
import io.dcloud.common.util.AESUtil;
import io.dcloud.common.util.AppRuntime;
import io.dcloud.common.util.BaseInfo;
import io.dcloud.common.util.IOUtil;
import io.dcloud.common.util.Md5Utils;
import io.dcloud.common.util.NetTool;
import io.dcloud.common.util.NetworkTypeUtil;
import io.dcloud.common.util.PdrUtil;
import io.dcloud.common.util.TelephonyUtil;
import io.dcloud.common.util.ZipUtils;
import io.dcloud.common.util.hostpicker.HostPicker;
import io.dcloud.feature.internal.sdk.SDK;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
public abstract class c {
class a implements HostPicker.HostPickCallback {
final String a;
final HashMap b;
a(String str, HashMap hashMap) {
this.a = str;
this.b = hashMap;
}
@Override
public boolean doRequest(HostPicker.Host host) {
JSONObject jSONObject;
byte[] httpPost = NetTool.httpPost(host.getRealHost(), this.a, (HashMap<String, String>) this.b, false);
if (httpPost == null) {
return false;
}
try {
jSONObject = new JSONObject(new String(httpPost, "utf-8"));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
jSONObject = null;
Logger.d("commitTid", jSONObject);
return true;
} catch (JSONException e2) {
e2.printStackTrace();
jSONObject = null;
Logger.d("commitTid", jSONObject);
return true;
}
Logger.d("commitTid", jSONObject);
return true;
}
@Override
public void onNoOnePicked() {
}
@Override
public void onOneSelected(HostPicker.Host host) {
}
}
class b implements HostPicker.HostPickCallback {
final String a;
final HashMap b;
b(String str, HashMap hashMap) {
this.a = str;
this.b = hashMap;
}
@Override
public boolean doRequest(HostPicker.Host host) {
JSONObject jSONObject;
byte[] httpPost = NetTool.httpPost(host.getRealHost(), this.a, (HashMap<String, String>) this.b, false);
if (httpPost == null) {
return false;
}
try {
jSONObject = new JSONObject(new String(httpPost, StandardCharsets.UTF_8));
} catch (JSONException unused) {
jSONObject = null;
}
Logger.d("commitTid", jSONObject);
return true;
}
@Override
public void onNoOnePicked() {
}
@Override
public void onOneSelected(HostPicker.Host host) {
}
}
public static HashMap a(IApp iApp, SharedPreferences sharedPreferences) {
HashMap hashMap = new HashMap();
try {
Activity activity = iApp.getActivity();
boolean hasPrivacyForNotShown = AppRuntime.hasPrivacyForNotShown(activity);
String str = null;
hashMap.putAll(DataInterface.getStartupUrlBaseData(activity, iApp.obtainAppId(), BaseInfo.getLaunchType(activity.getIntent()), (String) null, hasPrivacyForNotShown));
hashMap.put("st", Long.valueOf(BaseInfo.run5appEndTime));
hashMap.put("pn", activity.getPackageName());
hashMap.put("v", iApp.obtainAppVersionName());
hashMap.put("pv", AndroidResources.versionName);
hashMap.put("uat", Integer.valueOf(BaseInfo.isUniAppAppid(iApp) ? 1 : 0));
if (SDK.isUniMPSDK()) {
try {
hashMap.put("name", activity.getApplicationInfo().loadLabel(activity.getPackageManager()));
} catch (Exception unused) {
hashMap.put("name", iApp.obtainAppName());
}
} else {
hashMap.put("name", iApp.obtainAppName());
}
try {
hashMap.put("pname", activity.getApplicationInfo().loadLabel(activity.getPackageManager()));
} catch (Exception unused2) {
}
hashMap.put("it", Integer.valueOf(SDK.isUniMPSDK() ? 1 : 0));
if (SDK.isUniMPSDK()) {
boolean checkClass = PlatformUtil.checkClass(iApp.getConfusionMgr().getGDTClassName());
boolean checkClass2 = PlatformUtil.checkClass(iApp.getConfusionMgr().getCSJClassName());
boolean checkClass3 = PlatformUtil.checkClass(iApp.getConfusionMgr().getKSClassName());
JSONObject jSONObject = new JSONObject();
JSONObject jSONObject2 = new JSONObject();
String str2 = "1";
jSONObject2.put("r", checkClass2 ? "1" : "0");
jSONObject.put("csj", jSONObject2);
JSONObject jSONObject3 = new JSONObject();
jSONObject3.put("r", checkClass ? "1" : "0");
jSONObject.put("gdt", jSONObject3);
JSONObject jSONObject4 = new JSONObject();
if (!checkClass3) {
str2 = "0";
}
jSONObject4.put("r", str2);
jSONObject.put("ks", jSONObject4);
hashMap.put("cad", jSONObject.toString());
} else {
hashMap.put("psdk", 0);
}
String bundleData = SP.getBundleData(activity, "pdr", SP.REPORT_UNI_VERIFY_GYUID);
if (!TextUtils.isEmpty(bundleData)) {
hashMap.put("uvs", bundleData);
}
if (PdrUtil.isSupportOaid()) {
String str3 = DeviceInfo.oaids;
if (str3 == null) {
str3 = "||";
}
hashMap.put("oaid", str3);
}
if (BaseInfo.isUniAppAppid(iApp)) {
a(iApp, hashMap);
}
hashMap.put("dcid", AppRuntime.getDCloudDeviceID(activity));
if (TextUtils.isEmpty(BaseInfo.sChannel)) {
try {
str = AndroidResources.getMetaValue("DCLOUD_STREAMAPP_CHANNEL");
} catch (Exception e) {
e.printStackTrace();
}
if (TextUtils.isEmpty(str)) {
hashMap.put("mc", "");
} else {
hashMap.put("mc", str);
}
} else {
hashMap.put("mc", BaseInfo.sChannel);
}
try {
String bundleData2 = SP.getBundleData(iApp.getActivity(), "pdr", "packdata");
if (!TextUtils.isEmpty(bundleData2)) {
hashMap.put("jg", bundleData2);
SP.setBundleData(iApp.getActivity(), "pdr", "packdata", "");
}
e.a(iApp.getActivity());
} catch (Exception unused3) {
}
if (!hasPrivacyForNotShown) {
if ((System.currentTimeMillis() - sharedPreferences.getLong("commit_app_list_time", 0L)) / 100000 >= 26000 && !TextUtils.isEmpty(sharedPreferences.getString("geo_data", ""))) {
hashMap.put("pos", sharedPreferences.getString("geo_data", ""));
}
}
} catch (Exception e2) {
e2.printStackTrace();
}
return hashMap;
}
private static Map b(Context context, String str, String str2, int i2, String str3, HashMap hashMap) {
String str4;
String str5;
String str6;
try {
str4 = URLEncoder.encode(Build.MODEL, "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
str4 = "";
}
try {
str5 = DeviceInfo.sApplicationContext.getPackageManager().getPackageInfo(DeviceInfo.sApplicationContext.getPackageName(), 0).versionName;
} catch (Exception e2) {
e2.printStackTrace();
str5 = "";
}
String imei = TelephonyUtil.getIMEI(context, true, true);
HashMap hashMap2 = new HashMap();
hashMap2.put("p", "a");
hashMap2.put("appid", str);
hashMap2.put("v", str5);
hashMap2.put("at", Integer.valueOf(i2));
hashMap2.put("os", Integer.valueOf(Build.VERSION.SDK_INT));
hashMap2.put("adpid", str3);
if (imei.endsWith("&ie=1")) {
imei = imei.replace("&ie=1", "");
hashMap2.put("ie", 1);
} else if (imei.endsWith("&ie=0")) {
imei = imei.replace("&ie=0", "");
hashMap2.put("ie", 0);
}
hashMap2.put("imei", imei);
hashMap2.put("md", str4);
hashMap2.put("vd", Build.MANUFACTURER);
hashMap2.put("net", Integer.valueOf(NetworkTypeUtil.getNetworkType(DeviceInfo.sApplicationContext)));
hashMap2.put("vb", BaseInfo.sBaseVersion);
hashMap2.put("t", Long.valueOf(System.currentTimeMillis()));
if (TextUtils.isEmpty(BaseInfo.sChannel)) {
try {
str6 = AndroidResources.getMetaValue("DCLOUD_STREAMAPP_CHANNEL");
} catch (Exception e3) {
e3.printStackTrace();
str6 = null;
}
if (TextUtils.isEmpty(str6)) {
hashMap2.put("mc", "");
} else {
hashMap2.put("mc", str6);
}
} else {
hashMap2.put("mc", BaseInfo.sChannel);
}
hashMap2.put("paid", str2);
if (hashMap != null) {
hashMap2.putAll(hashMap);
}
return hashMap2;
}
private static void a(IApp iApp, HashMap hashMap) {
String str;
JSONArray jSONArray;
StringBuilder sb = new StringBuilder();
try {
str = IOUtil.toString(iApp.getActivity().getAssets().open("dcloud_uniplugins.json"));
} catch (Exception unused) {
str = null;
}
if (!PdrUtil.isEmpty(str)) {
try {
JSONArray jSONArray2 = JSON.parseObject(str).getJSONArray("nativePlugins");
if (jSONArray2 != null && jSONArray2.size() > 0) {
for (int i2 = 0; i2 < jSONArray2.size(); i2++) {
com.alibaba.fastjson.JSONObject jSONObject = jSONArray2.getJSONObject(i2);
if (jSONObject != null && (jSONArray = jSONObject.getJSONArray("plugins")) != null && jSONArray.size() > 0) {
for (int i3 = 0; i3 < jSONArray.size(); i3++) {
com.alibaba.fastjson.JSONObject jSONObject2 = jSONArray.getJSONObject(i3);
if (jSONObject2 != null && jSONObject2.containsKey("name")) {
sb.append(jSONObject2.getString("name"));
sb.append(",");
}
}
}
}
}
} catch (Exception unused2) {
}
}
if (sb.length() > 0) {
sb.deleteCharAt(sb.length() - 1);
hashMap.put("ups", sb.toString());
}
}
public static void a(Context context, String str, String str2, String str3, int i2, String str4, String str5, JSONObject jSONObject, String str6, String str7, String str8, String str9, HashMap hashMap) {
String str10;
try {
URLEncoder.encode(Build.MODEL, "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
try {
String str11 = DeviceInfo.sApplicationContext.getPackageManager().getPackageInfo(DeviceInfo.sApplicationContext.getPackageName(), 0).versionName;
} catch (Exception e2) {
e2.printStackTrace();
}
TelephonyUtil.getIMEI(context, true, true);
ArrayList arrayList = new ArrayList();
if (i2 == 1) {
arrayList.add(new HostPicker.Host("YHx8eHsyJyd8OSZsa2RnfWwmZm18JmtmJ2tnZGRta3wneGR9e2l4eCdpa3xhZ2Y=", HostPicker.Host.PriorityEnum.FIRST));
arrayList.add(new HostPicker.Host("YHx8eHsyJyd8OiZsa2RnfWwmZm18JmtmJ2tnZGRta3wneGR9e2l4eCdpa3xhZ2Y=", HostPicker.Host.PriorityEnum.NORMAL));
arrayList.add(new HostPicker.Host("YHx8eHsyJydqfDkmbGtkZ31sJmZtfCZrZidgfHx4J2tpaQ==", HostPicker.Host.PriorityEnum.BACKUP));
} else {
arrayList.add(new HostPicker.Host("YHx8eHsyJydpezkmbGtkZ31sJmZtfCZrZidrZ2RkbWt8J3hkfXtpeHgnaWt8YWdm", HostPicker.Host.PriorityEnum.FIRST));
arrayList.add(new HostPicker.Host("YHx8eHsyJydpezombGtkZ31sJmZtfCZrZidrZ2RkbWt8J3hkfXtpeHgnaWt8YWdm", HostPicker.Host.PriorityEnum.NORMAL));
arrayList.add(new HostPicker.Host("YHx8eHsyJydqaXs5JmxrZGd9bCZmbXwma2YnYHx8eCdraWk=", HostPicker.Host.PriorityEnum.BACKUP));
}
Map b2 = b(context, str, str3, i2, str8, hashMap);
if (str6 != null) {
b2.put("mediaId", str6);
}
if (str7 != null) {
b2.put("slotId", str7);
}
b2.put("tid", str2);
if (i2 == 32) {
b2.put("dec", str4);
b2.put("dem", str5);
}
if (i2 == 41 && jSONObject != null && str6 == null) {
if (jSONObject.has("img")) {
b2.put("img", Md5Utils.md5(jSONObject.optString("img")).toLowerCase(Locale.ENGLISH));
}
if (jSONObject.has("dw")) {
b2.put("dw", jSONObject.optString("dw"));
}
if (jSONObject.has("dh")) {
b2.put("dh", jSONObject.optString("dh"));
}
if (jSONObject.has("click_coord")) {
b2.put("click_coord", jSONObject.optJSONObject("click_coord").toString());
}
}
try {
str10 = URLEncoder.encode(Base64.encodeToString(AESUtil.encrypt(i.a.c(), i.a.b(), ZipUtils.zipString(new JSONObject(b2).toString())), 2), "utf-8");
} catch (UnsupportedEncodingException e3) {
e3.printStackTrace();
str10 = null;
}
String str12 = "edata=" + str10;
try {
HashMap hashMap2 = new HashMap();
try {
if (!PdrUtil.isEmpty(str9) && str9.equalsIgnoreCase("webview")) {
Object ADHandlerMethod = ADUtils.ADHandlerMethod("get", "ua-webview");
if (ADHandlerMethod instanceof String) {
hashMap2.put(IWebview.USER_AGENT, (String) ADHandlerMethod);
}
}
} catch (Exception unused) {
}
HostPicker.getInstance().pickSuitHost(context, arrayList, "CAA_" + i2, new a(str12, hashMap2));
} catch (Exception e4) {
Logger.p("CommitDataUtil", e4.getMessage());
}
}
public static void a(Context context, String str, String str2, int i2, String str3, HashMap hashMap) {
String str4;
Map b2 = b(context, str, str2, i2, str3, hashMap);
ArrayList arrayList = new ArrayList();
arrayList.add(new HostPicker.Host("YHx8eHsyJydpejkmbGtkZ31sJmZtfCZrZidrZ2RkbWt8J3hkfXtpeHgnent4", HostPicker.Host.PriorityEnum.FIRST));
arrayList.add(new HostPicker.Host("YHx8eHsyJydpejombGtkZ31sJmZtfCZrZidrZ2RkbWt8J3hkfXtpeHgnent4", HostPicker.Host.PriorityEnum.NORMAL));
arrayList.add(new HostPicker.Host("YHx8eHsyJydqaXo6JmxrZGd9bCZmbXwma2YnYHx8eCdraXo=", HostPicker.Host.PriorityEnum.BACKUP));
try {
str4 = URLEncoder.encode(Base64.encodeToString(AESUtil.encrypt(i.a.c(), i.a.b(), ZipUtils.zipString(new JSONObject(b2).toString())), 2), "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
str4 = null;
}
HostPicker.getInstance().pickSuitHost(context, arrayList, "RSP", new b("edata=" + str4, new HashMap()));
}
public static void a(IApp iApp, String str, String str2, String str3, String str4, org.json.JSONArray jSONArray) {
String str5;
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("p", "a");
jSONObject.put("t", str4);
jSONObject.put("a", str);
jSONObject.put("c", str2);
jSONObject.put("m", str3);
if (jSONArray != null) {
jSONObject.put("d", jSONArray);
}
jSONObject.put("pn", iApp.getActivity().getPackageName());
jSONObject.put("v", iApp.obtainAppVersionName());
jSONObject.put("pv", AndroidResources.versionName);
jSONObject.put("appid", iApp.obtainAppId());
jSONObject.put("os", Build.VERSION.SDK_INT);
jSONObject.put("md", Build.MODEL);
jSONObject.put("vd", Build.MANUFACTURER);
jSONObject.put("vb", BaseInfo.sBaseVersion);
if (TextUtils.isEmpty(BaseInfo.sChannel)) {
try {
str5 = AndroidResources.getMetaValue("DCLOUD_STREAMAPP_CHANNEL");
} catch (Exception e) {
e.printStackTrace();
str5 = null;
}
if (!TextUtils.isEmpty(str5)) {
jSONObject.put("mc", str5);
} else {
jSONObject.put("mc", "");
}
} else {
jSONObject.put("mc", BaseInfo.sChannel);
}
NetTool.httpPost(PdrUtil.checkIntl() ? "https://er.dcloud.io/rv" : "https://er.dcloud.net.cn/rv", jSONObject.toString(), null);
} catch (JSONException unused) {
}
}
}