Primer paso de la investigacion. Se aportan el .apk, las carpetas con el apk extraido y el apk descompilado. El archivo API_DOCUMENTATION.md es un archivo donde se anotaran los descubrimientos del funcionamiento de la API, y los .py son scripts para probar la funcionalidad de la API con los métodos que vayamos encontrando. Finalmente, los archivos .js son scripts de Frida para extraer informacion de la APP durante la ejecucion.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
package com.adif.elcanomovil.resources;
|
||||
|
||||
import Q2.d;
|
||||
import S2.h;
|
||||
import W2.b;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\bÆ\u0002\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003R\u001d\u0010\u0005\u001a\u00020\u00048\u0006¢\u0006\u0012\n\u0004\b\u0005\u0010\u0006\u0012\u0004\b\t\u0010\u0003\u001a\u0004\b\u0007\u0010\b¨\u0006\n"}, d2 = {"Lcom/adif/elcanomovil/resources/IntentUtil;", "", "<init>", "()V", "LQ2/d;", "gson", "LQ2/d;", "getGson", "()LQ2/d;", "getGson$annotations", "common-resources_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class IntentUtil {
|
||||
public static final IntentUtil INSTANCE = new IntentUtil();
|
||||
private static final d gson;
|
||||
|
||||
static {
|
||||
h hVar = h.f1597c;
|
||||
HashMap hashMap = new HashMap();
|
||||
ArrayList arrayList = new ArrayList();
|
||||
ArrayList arrayList2 = new ArrayList();
|
||||
LinkedList linkedList = new LinkedList();
|
||||
ArrayList arrayList3 = new ArrayList(arrayList2.size() + arrayList.size() + 3);
|
||||
arrayList3.addAll(arrayList);
|
||||
Collections.reverse(arrayList3);
|
||||
ArrayList arrayList4 = new ArrayList(arrayList2);
|
||||
Collections.reverse(arrayList4);
|
||||
arrayList3.addAll(arrayList4);
|
||||
boolean z3 = b.f1971a;
|
||||
d dVar = new d(hVar, new HashMap(hashMap), new ArrayList(arrayList), new ArrayList(arrayList2), arrayList3, new ArrayList(linkedList));
|
||||
Intrinsics.checkNotNullExpressionValue(dVar, "create(...)");
|
||||
gson = dVar;
|
||||
}
|
||||
|
||||
private IntentUtil() {
|
||||
}
|
||||
|
||||
public static /* synthetic */ void getGson$annotations() {
|
||||
}
|
||||
|
||||
public final d getGson() {
|
||||
return gson;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.adif.elcanomovil.resources;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000,\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0000\n\u0000\u001a%\u0010\u0002\u001a\u0004\u0018\u0001H\u0003\"\u0004\b\u0000\u0010\u0003*\u00020\u00042\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u0002H\u00030\u0006¢\u0006\u0002\u0010\u0007\u001a-\u0010\u0002\u001a\u0004\u0018\u0001H\u0003\"\u0004\b\u0000\u0010\u0003*\u00020\u00042\u0006\u0010\b\u001a\u00020\u00012\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u0002H\u00030\u0006¢\u0006\u0002\u0010\t\u001a-\u0010\u0002\u001a\u0004\u0018\u0001H\u0003\"\u0004\b\u0000\u0010\u0003*\u00020\n2\u0006\u0010\b\u001a\u00020\u00012\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u0002H\u00030\u0006¢\u0006\u0002\u0010\u000b\u001a\u001a\u0010\f\u001a\u00020\r*\u00020\u00042\u0006\u0010\b\u001a\u00020\u00012\u0006\u0010\u000e\u001a\u00020\u000f\u001a\u001a\u0010\f\u001a\u00020\r*\u00020\n2\u0006\u0010\b\u001a\u00020\u00012\u0006\u0010\u000e\u001a\u00020\u000f\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0086T¢\u0006\u0002\n\u0000¨\u0006\u0010"}, d2 = {"DEFAULT_NAME", "", "getJsonExtra", "T", "Landroid/content/Intent;", "class", "Ljava/lang/Class;", "(Landroid/content/Intent;Ljava/lang/Class;)Ljava/lang/Object;", AppMeasurementSdk.ConditionalUserProperty.NAME, "(Landroid/content/Intent;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;", "Landroid/os/Bundle;", "(Landroid/os/Bundle;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;", "putExtraJson", "", "src", "", "common-resources_proNon_corporateRelease"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class IntentUtilKt {
|
||||
public static final String DEFAULT_NAME = "object";
|
||||
|
||||
public static final <T> T getJsonExtra(Bundle bundle, String name, Class<T> cls) {
|
||||
Intrinsics.checkNotNullParameter(bundle, "<this>");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(cls, "class");
|
||||
String string = bundle.getString(name);
|
||||
if (string != null) {
|
||||
return (T) IntentUtil.INSTANCE.getGson().b(cls, string);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final void putExtraJson(Intent intent, String name, Object src) {
|
||||
Intrinsics.checkNotNullParameter(intent, "<this>");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(src, "src");
|
||||
intent.putExtra(name, IntentUtil.INSTANCE.getGson().f(src));
|
||||
}
|
||||
|
||||
public static final void putExtraJson(Bundle bundle, String name, Object src) {
|
||||
Intrinsics.checkNotNullParameter(bundle, "<this>");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(src, "src");
|
||||
bundle.putString(name, IntentUtil.INSTANCE.getGson().f(src));
|
||||
}
|
||||
|
||||
public static final <T> T getJsonExtra(Intent intent, String name, Class<T> cls) {
|
||||
Intrinsics.checkNotNullParameter(intent, "<this>");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(cls, "class");
|
||||
String stringExtra = intent.getStringExtra(name);
|
||||
if (stringExtra != null) {
|
||||
return (T) IntentUtil.INSTANCE.getGson().b(cls, stringExtra);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final <T> T getJsonExtra(Intent intent, Class<T> cls) {
|
||||
Intrinsics.checkNotNullParameter(intent, "<this>");
|
||||
Intrinsics.checkNotNullParameter(cls, "class");
|
||||
String stringExtra = intent.getStringExtra(DEFAULT_NAME);
|
||||
if (stringExtra != null) {
|
||||
return (T) IntentUtil.INSTANCE.getGson().b(cls, stringExtra);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.adif.elcanomovil.resources;
|
||||
|
||||
import F.j;
|
||||
import F.q;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import com.adif.elcanomovil.commonNavGraph.arguments.NavArguments;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u001c\u0010\u0003\u001a\u0004\u0018\u00010\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u00062\b\b\u0001\u0010\u0007\u001a\u00020\b¨\u0006\t"}, d2 = {"Lcom/adif/elcanomovil/resources/ResourcesUtils;", "", "()V", "vectorToBitmap", "Landroid/graphics/Bitmap;", "context", "Landroid/content/Context;", NavArguments.ARG_TYPE_NOTIFICATION_JSON_MESSAGE_TRAIN, "", "common-resources_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nResourcesUtils.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ResourcesUtils.kt\ncom/adif/elcanomovil/resources/ResourcesUtils\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,28:1\n1#2:29\n*E\n"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class ResourcesUtils {
|
||||
public static final ResourcesUtils INSTANCE = new ResourcesUtils();
|
||||
|
||||
private ResourcesUtils() {
|
||||
}
|
||||
|
||||
public final Bitmap vectorToBitmap(Context context, int id) {
|
||||
Bitmap bitmap;
|
||||
if (context != null) {
|
||||
Resources resources = context.getResources();
|
||||
ThreadLocal threadLocal = q.f503a;
|
||||
Drawable a2 = j.a(resources, id, null);
|
||||
if (a2 != null) {
|
||||
bitmap = Bitmap.createBitmap(a2.getIntrinsicWidth(), a2.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
|
||||
Intrinsics.checkNotNullExpressionValue(bitmap, "createBitmap(...)");
|
||||
Canvas canvas = new Canvas(bitmap);
|
||||
a2.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
|
||||
a2.draw(canvas);
|
||||
} else {
|
||||
bitmap = null;
|
||||
}
|
||||
if (bitmap != null) {
|
||||
return bitmap;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.adif.elcanomovil.resources;
|
||||
|
||||
import F.q;
|
||||
import android.content.Context;
|
||||
import android.graphics.Typeface;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.text.style.StyleSpan;
|
||||
import com.adif.elcanomovil.commonResources.R;
|
||||
import com.adif.elcanomovil.extensions.DoubleExtensionsKt;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\b\u0016\u0018\u0000 \u00032\u00020\u0001:\u0001\u0003B\u0005¢\u0006\u0002\u0010\u0002¨\u0006\u0004"}, d2 = {"Lcom/adif/elcanomovil/resources/StringUtils;", "", "()V", "Companion", "common-resources_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public class StringUtils {
|
||||
|
||||
/* renamed from: Companion, reason: from kotlin metadata */
|
||||
public static final Companion INSTANCE = new Companion(null);
|
||||
|
||||
@Metadata(d1 = {"\u0000<\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0002\b\u0006\n\u0002\u0010\u0006\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\n\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J&\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\n\u001a\u00020\bJ\u000e\u0010\u000b\u001a\u00020\u00062\u0006\u0010\f\u001a\u00020\u0006J\u0015\u0010\r\u001a\u00020\u00062\b\u0010\u000e\u001a\u0004\u0018\u00010\u000f¢\u0006\u0002\u0010\u0010J\u0015\u0010\u0011\u001a\u00020\u00062\b\u0010\u0012\u001a\u0004\u0018\u00010\u000f¢\u0006\u0002\u0010\u0010J\u0015\u0010\u0013\u001a\u00020\u00062\b\u0010\u0014\u001a\u0004\u0018\u00010\u000f¢\u0006\u0002\u0010\u0010J\u0010\u0010\u0015\u001a\u0004\u0018\u00010\u00162\u0006\u0010\f\u001a\u00020\u0006J\u0016\u0010\u0017\u001a\u00020\u00182\u0006\u0010\u0019\u001a\u00020\u001a2\u0006\u0010\u001b\u001a\u00020\u0006J\u0016\u0010\u001c\u001a\u00020\u00182\u0006\u0010\u0019\u001a\u00020\u001a2\u0006\u0010\u001b\u001a\u00020\u0006J5\u0010\u001d\u001a\u00020\u00042\u0006\u0010\u0019\u001a\u00020\u001a2\u0006\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\b2\b\u0010\n\u001a\u0004\u0018\u00010\b2\u0006\u0010\u001b\u001a\u00020\u0006¢\u0006\u0002\u0010\u001eJ0\u0010\u001f\u001a\u00020\u00182\u0006\u0010\u0019\u001a\u00020\u001a2\u0006\u0010 \u001a\u00020\u00062\u0006\u0010!\u001a\u00020\u00062\b\b\u0002\u0010\"\u001a\u00020\b2\u0006\u0010#\u001a\u00020\b¨\u0006$"}, d2 = {"Lcom/adif/elcanomovil/resources/StringUtils$Companion;", "", "()V", "colorMyText", "Landroid/text/Spannable;", "inputText", "", "startIndex", "", "endIndex", "textColor", "dateFormat", "date", "distanceToStringkKm", "distance", "", "(Ljava/lang/Double;)Ljava/lang/String;", "formatHeight", "height", "formatWight", "weight", "stringToDateShort", "Ljava/util/Date;", "textBold", "Landroid/text/SpannableString;", "context", "Landroid/content/Context;", "text", "textRegular", "textSemiBold", "(Landroid/content/Context;IILjava/lang/Integer;Ljava/lang/String;)Landroid/text/Spannable;", "textStyle", "textOne", "textTwo", "fontType", "color", "common-resources_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public static final class Companion {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
public static /* synthetic */ SpannableString textStyle$default(Companion companion, Context context, String str, String str2, int i, int i4, int i5, Object obj) {
|
||||
if ((i5 & 8) != 0) {
|
||||
i = R.font.open_sans_bold;
|
||||
}
|
||||
return companion.textStyle(context, str, str2, i, i4);
|
||||
}
|
||||
|
||||
public final Spannable colorMyText(String inputText, int startIndex, int endIndex, int textColor) {
|
||||
Intrinsics.checkNotNullParameter(inputText, "inputText");
|
||||
SpannableString spannableString = new SpannableString(inputText);
|
||||
spannableString.setSpan(new ForegroundColorSpan(textColor), startIndex, endIndex, 33);
|
||||
return spannableString;
|
||||
}
|
||||
|
||||
public final String dateFormat(String date) {
|
||||
Intrinsics.checkNotNullParameter(date, "date");
|
||||
if (date.length() == 0) {
|
||||
return "";
|
||||
}
|
||||
String format = new SimpleDateFormat("dd/MM/yyyy").format(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").parse(date));
|
||||
Intrinsics.checkNotNullExpressionValue(format, "format(...)");
|
||||
return format;
|
||||
}
|
||||
|
||||
public final String distanceToStringkKm(Double distance) {
|
||||
if (distance == null) {
|
||||
return "";
|
||||
}
|
||||
String str = DoubleExtensionsKt.round$default(distance.doubleValue() / 1000, 0, 1, null) + " km";
|
||||
return str == null ? "" : str;
|
||||
}
|
||||
|
||||
public final String formatHeight(Double height) {
|
||||
if (height == null) {
|
||||
return "";
|
||||
}
|
||||
String str = height.doubleValue() + " cm";
|
||||
return str == null ? "" : str;
|
||||
}
|
||||
|
||||
public final String formatWight(Double weight) {
|
||||
if (weight == null) {
|
||||
return "";
|
||||
}
|
||||
String str = DoubleExtensionsKt.round$default(weight.doubleValue(), 0, 1, null) + " kg";
|
||||
return str == null ? "" : str;
|
||||
}
|
||||
|
||||
public final Date stringToDateShort(String date) {
|
||||
Intrinsics.checkNotNullParameter(date, "date");
|
||||
if (date.length() == 0) {
|
||||
return null;
|
||||
}
|
||||
return new SimpleDateFormat("HH:mm", Locale.FRANCE).parse(date);
|
||||
}
|
||||
|
||||
public final SpannableString textBold(Context context, String text) {
|
||||
Intrinsics.checkNotNullParameter(context, "context");
|
||||
Intrinsics.checkNotNullParameter(text, "text");
|
||||
q.a(context, R.font.open_sans_bold);
|
||||
SpannableString spannableString = new SpannableString(text);
|
||||
spannableString.setSpan(new StyleSpan(1), 0, spannableString.length(), 18);
|
||||
return spannableString;
|
||||
}
|
||||
|
||||
public final SpannableString textRegular(Context context, String text) {
|
||||
Intrinsics.checkNotNullParameter(context, "context");
|
||||
Intrinsics.checkNotNullParameter(text, "text");
|
||||
SpannableString spannableString = new SpannableString(text);
|
||||
spannableString.setSpan(new StyleSpan(0), 0, text.length(), 18);
|
||||
return spannableString;
|
||||
}
|
||||
|
||||
public final Spannable textSemiBold(Context context, int startIndex, int endIndex, Integer textColor, String text) {
|
||||
Intrinsics.checkNotNullParameter(context, "context");
|
||||
Intrinsics.checkNotNullParameter(text, "text");
|
||||
Typeface a2 = q.a(context, R.font.open_sans_semi_bold);
|
||||
SpannableString spannableString = new SpannableString(text);
|
||||
if (textColor != null) {
|
||||
spannableString.setSpan(new ForegroundColorSpan(textColor.intValue()), startIndex, endIndex, 33);
|
||||
}
|
||||
spannableString.setSpan(a2, 0, spannableString.length(), 33);
|
||||
return spannableString;
|
||||
}
|
||||
|
||||
public final SpannableString textStyle(Context context, String textOne, String textTwo, int fontType, int color) {
|
||||
Intrinsics.checkNotNullParameter(context, "context");
|
||||
Intrinsics.checkNotNullParameter(textOne, "textOne");
|
||||
Intrinsics.checkNotNullParameter(textTwo, "textTwo");
|
||||
SpannableString spannableString = new SpannableString(textOne + ' ' + textTwo);
|
||||
spannableString.setSpan(new ForegroundColorSpan(color), textOne.length() + 1, spannableString.length(), 33);
|
||||
spannableString.setSpan(q.a(context, fontType), textOne.length() + 1, spannableString.length(), 33);
|
||||
spannableString.setSpan(new StyleSpan(1), textOne.length() + 1, spannableString.length(), 33);
|
||||
return spannableString;
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user