正在查看: Zepto v25.1.4 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Zepto v25.1.4 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.simpl.android.fingerprint.commons.exception;
import android.os.AsyncTask;
import android.os.Build;
import android.util.Xml;
import com.google.firebase.perf.network.FirebasePerfUrlConnection;
import com.truecaller.android.sdk.legacy.TruecallerSdkScope;
import in.juspay.hypersdk.core.PaymentConstants;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.Thread;
import java.net.URL;
import java.net.URLConnection;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import javax.net.ssl.HttpsURLConnection;
import org.apache.commons.lang3.CharEncoding;
import org.npci.upi.security.pinactivitycomponent.CLConstants;
import org.xmlpull.v1.XmlSerializer;
final class a {
public static String a = "production";
public static String b = "unknown";
public static String c = "unknown";
public static Map f2613d = null;
public static String f2614e = null;
public static String f2615f = null;
public static boolean f2616g = false;
public static class AnonymousClass1 extends AsyncTask<Void, Void, Void> {
@Override
public final Void doInBackground(Void[] voidArr) {
a.b(null, null);
return null;
}
}
final class AnonymousClass2 extends AsyncTask<Void, Void, Void> {
public final Throwable a;
public final Map b;
public AnonymousClass2(Throwable th, HashMap hashMap) {
this.a = th;
this.b = hashMap;
}
@Override
public final Void doInBackground(Void[] voidArr) {
Throwable th = this.a;
Map map = this.b;
a.c(th, map);
a.b(th.getMessage(), map);
return null;
}
}
public static class C0026a implements Thread.UncaughtExceptionHandler {
public Thread.UncaughtExceptionHandler a;
@Override
public final void uncaughtException(Thread thread, Throwable th) {
if (th != null) {
if (th.getMessage() == null || !th.getMessage().contains("simpl")) {
for (StackTraceElement stackTraceElement : th.getStackTrace()) {
if (stackTraceElement == null || !stackTraceElement.toString().contains("simpl")) {
}
}
}
if (a.f2616g) {
new AnonymousClass2(th, null).execute(new Void[0]);
}
}
this.a.uncaughtException(thread, th);
}
}
public static void a(File file) {
try {
HttpsURLConnection httpsURLConnection = (HttpsURLConnection) ((URLConnection) FirebasePerfUrlConnection.instrument(new URL("https://airbrakeapp.com/notifier_api/v2/notices").openConnection()));
try {
httpsURLConnection.setDoOutput(true);
httpsURLConnection.setRequestProperty("Content-Type", "text/xml; charset=utf-8");
FileInputStream fileInputStream = new FileInputStream(file);
OutputStream outputStream = httpsURLConnection.getOutputStream();
byte[] bArr = new byte[TruecallerSdkScope.FOOTER_TYPE_LATER];
while (true) {
int read = fileInputStream.read(bArr);
if (read < 0) {
outputStream.flush();
outputStream.close();
fileInputStream.close();
int responseCode = httpsURLConnection.getResponseCode();
file.getName();
String.valueOf(responseCode);
file.delete();
httpsURLConnection.disconnect();
return;
}
outputStream.write(bArr, 0, read);
}
} catch (IOException unused) {
httpsURLConnection.disconnect();
} catch (Throwable th) {
httpsURLConnection.disconnect();
throw th;
}
} catch (Exception unused2) {
}
}
public static void b(String str, Map map) {
synchronized (a.class) {
try {
File file = new File(f2615f);
if (file.exists() && file.isDirectory()) {
for (File file2 : file.listFiles()) {
if (file2.exists() && file2.isFile()) {
a(file2);
}
}
}
} catch (Throwable th) {
if (map != null) {
try {
map.put("message_caused_error", str);
} catch (Throwable th2) {
throw th2;
}
}
c(th, map);
}
}
}
public static void c(Throwable th, Map map) {
String str;
String str2 = "notice";
try {
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(f2615f + c + "-" + String.valueOf(new Random().nextInt(99999)) + ".xml"));
XmlSerializer newSerializer = Xml.newSerializer();
newSerializer.setOutput(bufferedWriter);
newSerializer.startDocument(CharEncoding.UTF_8, Boolean.TRUE);
newSerializer.startTag("", "notice");
newSerializer.attribute("", "version", "2.0");
newSerializer.startTag("", "api-key");
newSerializer.text(f2614e);
newSerializer.endTag("", "api-key");
newSerializer.startTag("", "notifier");
newSerializer.startTag("", CLConstants.FIELD_PAY_INFO_NAME);
newSerializer.text("Android Airbrake Notifier");
newSerializer.endTag("", CLConstants.FIELD_PAY_INFO_NAME);
newSerializer.startTag("", "version");
newSerializer.text("1.3.0");
newSerializer.endTag("", "version");
newSerializer.startTag("", PaymentConstants.URL);
newSerializer.text("http://loopj.com");
newSerializer.endTag("", PaymentConstants.URL);
newSerializer.endTag("", "notifier");
newSerializer.startTag("", "error");
newSerializer.startTag("", "class");
newSerializer.text(th.getClass().getName());
newSerializer.endTag("", "class");
newSerializer.startTag("", "message");
newSerializer.text("[" + c + "] " + th.toString());
newSerializer.endTag("", "message");
newSerializer.startTag("", "backtrace");
Throwable th2 = th;
while (th2 != null) {
try {
StackTraceElement[] stackTrace = th2.getStackTrace();
int length = stackTrace.length;
int i2 = 0;
while (i2 < length) {
StackTraceElement stackTraceElement = stackTrace[i2];
newSerializer.startTag("", "line");
StackTraceElement[] stackTraceElementArr = stackTrace;
int i3 = length;
try {
StringBuilder sb = new StringBuilder();
str = str2;
try {
sb.append(stackTraceElement.getClassName());
sb.append(CLConstants.DOT_SALT_DELIMETER);
sb.append(stackTraceElement.getMethodName());
newSerializer.attribute("", "method", sb.toString());
newSerializer.attribute("", "file", stackTraceElement.getFileName() == null ? "Unknown" : stackTraceElement.getFileName());
newSerializer.attribute("", "number", String.valueOf(stackTraceElement.getLineNumber()));
} catch (Throwable unused) {
}
} catch (Throwable unused2) {
str = str2;
}
try {
newSerializer.endTag("", "line");
i2++;
stackTrace = stackTraceElementArr;
length = i3;
str2 = str;
} catch (Throwable unused3) {
}
}
String str3 = str2;
th2 = th2.getCause();
if (th2 != null) {
newSerializer.startTag("", "line");
try {
newSerializer.attribute("", "file", "### CAUSED BY ###: " + th2.toString());
newSerializer.attribute("", "number", "");
} catch (Throwable unused4) {
}
newSerializer.endTag("", "line");
}
str2 = str3;
} catch (Throwable unused5) {
}
}
str = str2;
newSerializer.endTag("", "backtrace");
newSerializer.endTag("", "error");
newSerializer.startTag("", "request");
newSerializer.startTag("", PaymentConstants.URL);
newSerializer.endTag("", PaymentConstants.URL);
newSerializer.startTag("", "component");
newSerializer.endTag("", "component");
newSerializer.startTag("", "action");
newSerializer.endTag("", "action");
newSerializer.startTag("", "cgi-data");
newSerializer.startTag("", "var");
newSerializer.attribute("", "key", "Device");
newSerializer.text(Build.MODEL);
newSerializer.endTag("", "var");
newSerializer.startTag("", "var");
newSerializer.attribute("", "key", "Android Version");
newSerializer.text(Build.VERSION.RELEASE);
newSerializer.endTag("", "var");
newSerializer.startTag("", "var");
newSerializer.attribute("", "key", "App Version");
newSerializer.text(c);
newSerializer.endTag("", "var");
newSerializer.startTag("", "var");
newSerializer.attribute("", "key", "Parent App");
newSerializer.text(b);
newSerializer.endTag("", "var");
Map map2 = f2613d;
if (map2 != null && !map2.isEmpty()) {
for (Map.Entry entry : f2613d.entrySet()) {
newSerializer.startTag("", "var");
newSerializer.attribute("", "key", (String) entry.getKey());
newSerializer.text((String) entry.getValue());
newSerializer.endTag("", "var");
}
}
if (map != null && !map.isEmpty()) {
for (Map.Entry entry2 : map.entrySet()) {
newSerializer.startTag("", "var");
newSerializer.attribute("", "key", (String) entry2.getKey());
newSerializer.text((String) entry2.getValue());
newSerializer.endTag("", "var");
}
}
newSerializer.endTag("", "cgi-data");
newSerializer.endTag("", "request");
newSerializer.startTag("", "server-environment");
newSerializer.startTag("", "environment-name");
newSerializer.text(a);
newSerializer.endTag("", "environment-name");
newSerializer.startTag("", "app-version");
newSerializer.text(c);
newSerializer.endTag("", "app-version");
newSerializer.endTag("", "server-environment");
newSerializer.endTag("", str);
newSerializer.endDocument();
bufferedWriter.flush();
bufferedWriter.close();
} catch (Exception unused6) {
}
}
}