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,77 @@
|
||||
package com.google.firebase.internal;
|
||||
|
||||
import D.h;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import com.google.firebase.DataCollectionDefaultChange;
|
||||
import com.google.firebase.events.Event;
|
||||
import com.google.firebase.events.Publisher;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class DataCollectionConfigStorage {
|
||||
public static final String DATA_COLLECTION_DEFAULT_ENABLED = "firebase_data_collection_default_enabled";
|
||||
private static final String FIREBASE_APP_PREFS = "com.google.firebase.common.prefs:";
|
||||
private boolean dataCollectionDefaultEnabled;
|
||||
private final Context deviceProtectedContext;
|
||||
private final Publisher publisher;
|
||||
private final SharedPreferences sharedPreferences;
|
||||
|
||||
public DataCollectionConfigStorage(Context context, String str, Publisher publisher) {
|
||||
Context directBootSafe = directBootSafe(context);
|
||||
this.deviceProtectedContext = directBootSafe;
|
||||
this.sharedPreferences = directBootSafe.getSharedPreferences(FIREBASE_APP_PREFS + str, 0);
|
||||
this.publisher = publisher;
|
||||
this.dataCollectionDefaultEnabled = readAutoDataCollectionEnabled();
|
||||
}
|
||||
|
||||
private static Context directBootSafe(Context context) {
|
||||
return h.createDeviceProtectedStorageContext(context);
|
||||
}
|
||||
|
||||
private boolean readAutoDataCollectionEnabled() {
|
||||
return this.sharedPreferences.contains(DATA_COLLECTION_DEFAULT_ENABLED) ? this.sharedPreferences.getBoolean(DATA_COLLECTION_DEFAULT_ENABLED, true) : readManifestDataCollectionEnabled();
|
||||
}
|
||||
|
||||
private boolean readManifestDataCollectionEnabled() {
|
||||
ApplicationInfo applicationInfo;
|
||||
Bundle bundle;
|
||||
try {
|
||||
PackageManager packageManager = this.deviceProtectedContext.getPackageManager();
|
||||
if (packageManager == null || (applicationInfo = packageManager.getApplicationInfo(this.deviceProtectedContext.getPackageName(), 128)) == null || (bundle = applicationInfo.metaData) == null || !bundle.containsKey(DATA_COLLECTION_DEFAULT_ENABLED)) {
|
||||
return true;
|
||||
}
|
||||
return applicationInfo.metaData.getBoolean(DATA_COLLECTION_DEFAULT_ENABLED);
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void updateDataCollectionDefaultEnabled(boolean z3) {
|
||||
if (this.dataCollectionDefaultEnabled != z3) {
|
||||
this.dataCollectionDefaultEnabled = z3;
|
||||
this.publisher.publish(new Event<>(DataCollectionDefaultChange.class, new DataCollectionDefaultChange(z3)));
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized boolean isEnabled() {
|
||||
return this.dataCollectionDefaultEnabled;
|
||||
}
|
||||
|
||||
public synchronized void setEnabled(Boolean bool) {
|
||||
try {
|
||||
if (bool == null) {
|
||||
this.sharedPreferences.edit().remove(DATA_COLLECTION_DEFAULT_ENABLED).apply();
|
||||
updateDataCollectionDefaultEnabled(readManifestDataCollectionEnabled());
|
||||
} else {
|
||||
boolean equals = Boolean.TRUE.equals(bool);
|
||||
this.sharedPreferences.edit().putBoolean(DATA_COLLECTION_DEFAULT_ENABLED, equals).apply();
|
||||
updateDataCollectionDefaultEnabled(equals);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.google.firebase.internal;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.firebase.auth.GetTokenResult;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public interface InternalTokenProvider {
|
||||
@KeepForSdk
|
||||
Task<GetTokenResult> getAccessToken(boolean z3);
|
||||
|
||||
@KeepForSdk
|
||||
String getUid();
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.google.firebase.internal;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class InternalTokenResult {
|
||||
private String zza;
|
||||
|
||||
@KeepForSdk
|
||||
public InternalTokenResult(String str) {
|
||||
this.zza = str;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof InternalTokenResult) {
|
||||
return Objects.equal(this.zza, ((InternalTokenResult) obj).zza);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public String getToken() {
|
||||
return this.zza;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(this.zza);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return Objects.toStringHelper(this).add("token", this.zza).toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.google.firebase.internal.api;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.firebase.FirebaseException;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirebaseNoSignedInUserException extends FirebaseException {
|
||||
@KeepForSdk
|
||||
public FirebaseNoSignedInUserException(String str) {
|
||||
super(str);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user