正在查看: Crafto v9.3.3 应用的 gh.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Crafto v9.3.3 应用的 gh.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.uxcam.internals;
import F2.u;
import Pi.o;
import android.content.Context;
import com.uxcam.internals.hb;
import com.uxcam.service.HttpPostService;
import java.io.File;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Iterator;
public class gh {
public final Context a;
public class aa implements Comparator {
public aa(gh ghVar) {
}
@Override
public int compare(Object obj, Object obj2) {
File file = (File) obj;
File file2 = (File) obj2;
if (file.lastModified() > file2.lastModified()) {
return -1;
}
return file.lastModified() < file2.lastModified() ? 1 : 0;
}
}
public gh(Context context) {
this.a = context;
}
public void a() {
int i = gt.a;
try {
a(true);
} catch (Exception e) {
hb.c.getClass();
gc a = new gc().a("Exception");
a.a("site_of_error", "SendOfflineData::deleteOfflineData()");
u.b(e, a, "reason", 2);
}
}
public void b() {
int i = gt.a;
try {
a(false);
} catch (Exception e) {
hb.c.getClass();
gc a = new gc().a("Exception");
a.a("site_of_error", "SendOfflineData::uploadOfflineData()");
u.b(e, a, "reason", 2);
}
}
public final void a(boolean z) {
File[] listFiles;
try {
File[] listFiles2 = new File(by.a()).listFiles();
if (listFiles2 == null) {
gc a = new gc().a("Process offline files on session");
a.a("site_of_error", "SendOfflineData::ProcessFilesInSDCard()");
a.a("reason", "Folder is empty");
a.a(1);
return;
}
Arrays.sort(listFiles2, new aa(this));
gc a2 = new gc().a("Processing Previous Session");
a2.a("site_of_error", "SendOfflineData::ProcessFilesInSDCard()");
a2.a("sessionCount", "" + (listFiles2.length - 1));
a2.a(1);
for (File file : listFiles2) {
if (!file.getName().equals(gt.b) && (listFiles = file.listFiles()) != null) {
if (listFiles.length == 0) {
file.delete();
} else if (z) {
if (!ih.a(file)) {
ih.c(file);
} else {
ih.b(file);
new bj("").a(1, by.a() + "/" + file.getName() + "/");
}
} else if (bh.a(this.a)) {
String name = file.getName();
String str = ht.f().b;
Iterator it = af.a().iterator();
while (true) {
if (!it.hasNext()) {
break;
}
String str2 = (String) it.next();
if (name.endsWith(String.valueOf(str2.hashCode()))) {
str = str2;
break;
}
}
b(file, str);
}
}
}
} catch (Exception e) {
hb.c.getClass();
gc a3 = new gc().a("Exception");
a3.a("site_of_error", "SendOfflineData::ProcessFilesInSDCard()");
u.b(e, a3, "reason", 2);
}
}
public final void b(File file, String str) {
File[] listFiles = file.listFiles(new o());
if (listFiles == null) {
return;
}
a(listFiles);
if (listFiles.length > 0) {
Iterator it = HttpPostService.b.iterator();
while (it.hasNext()) {
if (file.getAbsolutePath().equals((String) it.next())) {
hb.ab a = hb.a("gh");
file.toString();
a.getClass();
return;
}
}
ae aeVar = new ae();
aeVar.f384d = true;
Context context = this.a;
aeVar.a = context;
aeVar.b = file;
if (file.exists()) {
new iq(context).a(aeVar, str);
}
}
}
public static boolean a(File file, String str) {
return by.a(str) || str.startsWith("data") || str.startsWith("icon");
}
public final void a(File[] fileArr) {
for (File file : fileArr) {
if (file.length() == 0 && !file.getName().startsWith("icon")) {
String str = by.a() + "/" + file.getParentFile().getName() + "/";
ih.c(file.getParentFile());
gc a = new gc().a("Unexpected Session End");
a.a("site_of_error", "SendOfflineData::deleteSessionIfUnexpectedlyClosed");
a.a("directory", file.getParentFile().getName()).a("event_happened", System.currentTimeMillis()).a(2);
new bj("").a(3, str);
return;
}
if (file.getName().contains(".aes")) {
ih.c(file);
gc a2 = new gc().a("Unexpected File found");
a2.a("site_of_error", "SendOfflineData::deleteSessionIfUnexpectedlyClosed");
a2.a("desc", "delete .aes file").a("directory", file.getPath()).a("event_happened", System.currentTimeMillis()).a(3);
} else if (file.getName().contains(".mp4")) {
try {
is isVar = new is(file);
isVar.a();
ih.c(file);
ih.c(isVar.b);
} catch (Exception unused) {
gc a3 = new gc().a("Unexpected File found");
a3.a("site_of_error", "SendOfflineData::deleteSessionIfUnexpectedlyClosed");
a3.a("desc", "re-encrypt video file").a("directory", file.getPath()).a("event_happened", System.currentTimeMillis()).a(3);
}
}
}
}
}