正在查看: 饼干视频 v4.1.0 应用的 C0053.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 饼干视频 v4.1.0 应用的 C0053.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package amc.cd.p014;
import android.content.Context;
import android.os.Build;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import com.hailiang.advlib.common.d;
import com.hailiang.advlib.common.e;
import com.hailiang.advlib.core.QMConfig;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import org.json.JSONObject;
public class C0053 {
public static String f50;
public class RunnableC0054 implements Runnable {
public final QMConfig f51;
public RunnableC0054(QMConfig qMConfig) {
this.f51 = qMConfig;
}
@Override
public void run() {
C0053.this.m12(this.f51);
d.a(this, 900000L);
}
}
public static class C0055 {
public static C0053 f53 = new C0053(null);
}
public C0053(RunnableC0054 runnableC0054) {
this();
}
public static boolean m3(String str, File file) {
if (TextUtils.isEmpty(str)) {
return true;
}
try {
return !str.equals(e.a(new FileInputStream(file), 0, -1));
} catch (Throwable unused) {
return true;
}
}
public static String m4(String str) {
return "temp_" + str;
}
public static C0053 m5() {
return C0055.f53;
}
public static void m6(File file) {
if (file == null || !file.exists()) {
return;
}
file.delete();
}
public static void m7(File file, File file2) {
if (file.exists()) {
file.delete();
}
file2.renameTo(file);
if (Build.VERSION.SDK_INT == 34) {
file.setReadOnly();
}
}
public static String m8(@NonNull Context context) {
if (!TextUtils.isEmpty(f50)) {
return f50;
}
String b = e.b(context);
f50 = b;
return b;
}
public static boolean m9(@NonNull File file) throws IOException {
ZipFile zipFile;
try {
zipFile = new ZipFile(file);
try {
Enumeration<? extends ZipEntry> entries = zipFile.entries();
boolean z = false;
boolean z2 = false;
while (entries.hasMoreElements()) {
ZipEntry nextElement = entries.nextElement();
if (nextElement.getName().equals("androidx.temp")) {
z = true;
} else if (nextElement.getName().equals("android.temp")) {
z2 = true;
}
if (!z || !z2) {
}
}
try {
zipFile.close();
} catch (IOException unused) {
}
boolean a = e.a();
return a == z || (a ^ true) == z2;
} catch (Throwable th) {
th = th;
if (zipFile != null) {
try {
zipFile.close();
} catch (IOException unused2) {
}
}
throw th;
}
} catch (Throwable th2) {
th = th2;
zipFile = null;
}
}
public static String m10(Context context, String str, String str2, String str3) throws IOException {
long currentTimeMillis = System.currentTimeMillis();
URLConnection openConnection = new URL(str).openConnection();
try {
File file = new File(str2 + "/" + str3);
String a = (file.exists() && Build.VERSION.SDK_INT == 33) ? e.a(new FileInputStream(file), 0, -1) : "";
File file2 = new File(str2 + "/" + m4(str3));
m6(file2);
file2.createNewFile();
FileOutputStream fileOutputStream = new FileOutputStream(file2);
InputStream inputStream = openConnection.getInputStream();
if (str.endsWith(".jar")) {
e.a(inputStream, fileOutputStream);
} else {
e.b(inputStream, fileOutputStream);
}
inputStream.close();
fileOutputStream.flush();
fileOutputStream.close();
if (!m9(file2)) {
d.a(context, "NOT_MATCH", str, System.currentTimeMillis() - currentTimeMillis);
m6(file2);
try {
if (openConnection instanceof HttpURLConnection) {
if (((HttpURLConnection) openConnection).getErrorStream() != null) {
((HttpURLConnection) openConnection).getErrorStream().close();
}
((HttpURLConnection) openConnection).disconnect();
}
} catch (Throwable unused) {
}
return "";
}
if (Build.VERSION.SDK_INT != 33) {
m7(file, file2);
d.a(context, "FINISH", str, System.currentTimeMillis() - currentTimeMillis);
String str4 = str2 + str3;
try {
if (openConnection instanceof HttpURLConnection) {
if (((HttpURLConnection) openConnection).getErrorStream() != null) {
((HttpURLConnection) openConnection).getErrorStream().close();
}
((HttpURLConnection) openConnection).disconnect();
}
} catch (Throwable unused2) {
}
return str4;
}
if (!m3(a, file2)) {
m6(file2);
d.a(context, "READ_FILE", str, System.currentTimeMillis() - currentTimeMillis);
try {
if (openConnection instanceof HttpURLConnection) {
if (((HttpURLConnection) openConnection).getErrorStream() != null) {
((HttpURLConnection) openConnection).getErrorStream().close();
}
((HttpURLConnection) openConnection).disconnect();
}
} catch (Throwable unused3) {
}
return "";
}
m7(file, file2);
d.a(context, "FINISH", str, System.currentTimeMillis() - currentTimeMillis);
String str5 = str2 + str3;
try {
if (openConnection instanceof HttpURLConnection) {
if (((HttpURLConnection) openConnection).getErrorStream() != null) {
((HttpURLConnection) openConnection).getErrorStream().close();
}
((HttpURLConnection) openConnection).disconnect();
}
} catch (Throwable unused4) {
}
return str5;
} catch (Throwable th) {
if (openConnection != null) {
try {
if (openConnection instanceof HttpURLConnection) {
if (((HttpURLConnection) openConnection).getErrorStream() != null) {
((HttpURLConnection) openConnection).getErrorStream().close();
}
((HttpURLConnection) openConnection).disconnect();
}
} catch (Throwable unused5) {
}
}
throw th;
}
}
public void m11(QMConfig qMConfig) {
d.a(new RunnableC0054(qMConfig));
}
public void m12(com.hailiang.advlib.core.QMConfig r9) {
throw new UnsupportedOperationException("Method not decompiled: amc.cd.p014.C0053.m12(com.hailiang.advlib.core.QMConfig):void");
}
public final JSONObject m13(Context context, QMConfig qMConfig) {
FileInputStream fileInputStream;
String str;
File file = new File(C0057.f63 + "/" + C0057.f67);
try {
if (file.length() > 0) {
fileInputStream = new FileInputStream(file);
try {
str = e.a(fileInputStream, 0, -1);
} catch (Throwable th) {
th = th;
try {
th.printStackTrace();
if (fileInputStream != null) {
try {
fileInputStream.close();
} catch (Throwable th2) {
th2.printStackTrace();
}
}
return null;
} finally {
if (fileInputStream != null) {
try {
fileInputStream.close();
} catch (Throwable th3) {
th3.printStackTrace();
}
}
}
}
} else {
str = "";
fileInputStream = null;
}
String str2 = Build.VERSION.RELEASE;
if (str2 == null) {
throw new IllegalStateException();
}
String str3 = Build.BRAND;
String str4 = Build.MODEL;
String packageName = context.getPackageName();
String m8 = m8(context);
if (TextUtils.isEmpty(m8)) {
return null;
}
JSONObject jSONObject = new JSONObject();
String androidId = qMConfig.getAndroidId();
if (TextUtils.isEmpty(androidId)) {
androidId = C0057.m41(context);
}
String m48 = C0064.m45().m48(context);
String m49 = C0064.m45().m49(context);
StringBuilder sb = new StringBuilder();
sb.append("value=");
sb.append(androidId);
jSONObject.put("current_md5", str).put("brand", str3).put("model", str4).put("sdk_version", "3.468.15.434").put("os_version", str2).put("package_name", packageName).put("app_version", m8).put("local_version", C0057.f76).put("remote_version", C0057.f65).put("is_androidx", String.valueOf(e.a())).put("load_version", C0057.f73).put("lib_pkg_name", C0063.m44()).put("op1", m48).put("op2", m49).put("dda", URLEncoder.encode(C0052.m1("CPC!@#$%Q529! 1*", androidId)));
if (fileInputStream != null) {
try {
fileInputStream.close();
} catch (Throwable th4) {
th4.printStackTrace();
}
}
return jSONObject;
} catch (Throwable th5) {
th = th5;
fileInputStream = null;
}
}
public C0053() {
}
}