MD5 校验值:a9a821418db4ad35214aeeb08c2f5902
AutoAuthService.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package com.ghostify; import android.app.Service; import android.content.Intent; import android.net.Uri; import android.os.Handler; import android.os.IBinder; import android.util.Log; import androidx.activity.b; import androidx.appcompat.widget.b1; import com.ghostify.dto.AutoAuthDto; import d7.d; import d7.e; import d7.k; import d7.o; import d7.q; import d7.r; import d7.t; import d7.u; import d7.v; import e7.g; import java.io.IOException; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Set; import o8.f; import s6.h; import t0.a; public class AutoAuthService extends Service { public static int f2799m; public long f2800k; public Handler f2801l = new Handler(); public class a implements e { public a() { } public void a(u uVar) { String str; int i9; String str2; ArrayList arrayList; ArrayList<a.c> arrayList2; String str3; int i10 = uVar.f4110c; v vVar = uVar.f4114g; long d9 = vVar.d(); if (d9 > 2147483647L) { throw new IOException(b.l("Cannot buffer entire body for content length: ", d9)); } f n9 = vVar.n(); try { byte[] a02 = n9.a0(); g.c(n9); if (d9 != -1 && d9 != a02.length) { throw new IOException("Content-Length and stream length disagree"); } q f3 = vVar.f(); Charset charset = g.f4296c; if (f3 != null && (str3 = f3.f4077b) != null) { charset = Charset.forName(str3); } String str4 = new String(a02, charset.name()); if (i10 == 200) { AutoAuthDto autoAuthDto = (AutoAuthDto) new h().b(str4, AutoAuthDto.class); if (autoAuthDto.status == 0) { Intent intent = new Intent("ghostify.auto.auth"); intent.putExtra("auto-auth-code", autoAuthDto.code); t0.a a9 = t0.a.a(AutoAuthService.this); synchronized (a9.f8590b) { String action = intent.getAction(); String resolveTypeIfNeeded = intent.resolveTypeIfNeeded(a9.f8589a.getContentResolver()); Uri data = intent.getData(); String scheme = intent.getScheme(); Set<String> categories = intent.getCategories(); boolean z8 = (intent.getFlags() & 8) != 0; if (z8) { Log.v("LocalBroadcastManager", "Resolving type " + resolveTypeIfNeeded + " scheme " + scheme + " of intent " + intent); } ArrayList<a.c> arrayList3 = a9.f8591c.get(intent.getAction()); if (arrayList3 != null) { if (z8) { Log.v("LocalBroadcastManager", "Action list: " + arrayList3); } ArrayList arrayList4 = null; int i11 = 0; while (i11 < arrayList3.size()) { a.c cVar = arrayList3.get(i11); if (z8) { Log.v("LocalBroadcastManager", "Matching against filter " + cVar.f8597a); } if (cVar.f8599c) { if (z8) { Log.v("LocalBroadcastManager", " Filter's target already added"); } i9 = i11; arrayList2 = arrayList3; str = action; str2 = resolveTypeIfNeeded; arrayList = arrayList4; } else { str = action; String str5 = resolveTypeIfNeeded; i9 = i11; str2 = resolveTypeIfNeeded; arrayList = arrayList4; arrayList2 = arrayList3; int match = cVar.f8597a.match(action, str5, scheme, data, categories, "LocalBroadcastManager"); if (match >= 0) { if (z8) { Log.v("LocalBroadcastManager", " Filter matched! match=0x" + Integer.toHexString(match)); } arrayList4 = arrayList == null ? new ArrayList() : arrayList; arrayList4.add(cVar); cVar.f8599c = true; i11 = i9 + 1; action = str; resolveTypeIfNeeded = str2; arrayList3 = arrayList2; } else if (z8) { Log.v("LocalBroadcastManager", " Filter did not match: " + (match != -4 ? match != -3 ? match != -2 ? match != -1 ? "unknown reason" : "type" : "data" : "action" : "category")); } } arrayList4 = arrayList; i11 = i9 + 1; action = str; resolveTypeIfNeeded = str2; arrayList3 = arrayList2; } ArrayList arrayList5 = arrayList4; if (arrayList5 != null) { for (int i12 = 0; i12 < arrayList5.size(); i12++) { ((a.c) arrayList5.get(i12)).f8599c = false; } a9.f8592d.add(new a.b(intent, arrayList5)); if (!a9.f8593e.hasMessages(1)) { a9.f8593e.sendEmptyMessage(1); } } } } AutoAuthService.this.stopSelf(); return; } } AutoAuthService.this.f2801l.postDelayed(new b1(this, 3), 10000L); } catch (Throwable th) { g.c(n9); throw th; } } } public final void a() { StringBuilder t8; int i9; o a9; if (System.currentTimeMillis() - this.f2800k > 150000) { stopSelf(); return; } r rVar = new r(); String str = f2799m == 0 ? "https://ghostify-hooks.oddrun.workers.dev/2fauth/token" : "https://ghostify-hooks.oddrun.workers.dev/2fauth/backup-code"; t.b bVar = new t.b(); if (!str.regionMatches(true, 0, "ws:", 0, 3)) { if (str.regionMatches(true, 0, "wss:", 0, 4)) { t8 = b.t("https:"); i9 = 4; } o.b bVar2 = new o.b(); a9 = bVar2.e(null, str) != 1 ? bVar2.a() : null; if (a9 == null) { bVar.d(a9); d dVar = new d(rVar, bVar.a()); a aVar = new a(); synchronized (dVar) { if (dVar.f4001b) { throw new IllegalStateException("Already Executed"); } dVar.f4001b = true; } k kVar = dVar.f4000a.f4079l; d.c cVar = new d.c(aVar, false, null); synchronized (kVar) { if (kVar.f4049c.size() >= 64 || kVar.d(cVar) >= 5) { kVar.f4048b.add(cVar); } else { kVar.f4049c.add(cVar); kVar.b().execute(cVar); } } return; } throw new IllegalArgumentException(b.n("unexpected url: ", str)); } t8 = b.t("http:"); i9 = 3; t8.append(str.substring(i9)); str = t8.toString(); o.b bVar22 = new o.b(); if (bVar22.e(null, str) != 1) { } if (a9 == null) { } } @Override public IBinder onBind(Intent intent) { return null; } @Override public int onStartCommand(Intent intent, int i9, int i10) { this.f2800k = System.currentTimeMillis(); this.f2801l.postDelayed(new b1(this, 2), 10000L); return super.onStartCommand(intent, i9, i10); } }