MD5 校验值:a9a821418db4ad35214aeeb08c2f5902
HomeFragment.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package com.ghostify.ui.home; import android.app.AlertDialog; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.webkit.CookieManager; import android.webkit.JavascriptInterface; import android.webkit.WebChromeClient; import android.webkit.WebStorage; import android.webkit.WebView; import android.widget.LinearLayout; import androidx.emoji2.text.e; import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import com.getghostify.R; import com.ghostify.AutoAuthService; import com.ghostify.MainActivity; import com.google.firebase.analytics.FirebaseAnalytics; import f1.b; import j1.d; import j1.f; import java.util.HashMap; import java.util.Locale; import o8.t; import p0.c; public class HomeFragment extends e1.a implements SwipeRefreshLayout.h, f1.a { public static final int f2808l0 = 0; public WebView f2809d0; public SwipeRefreshLayout f2810e0; public MainActivity f2811f0; public boolean f2812g0; public int f2813h0; public int f2814i0; public AlertDialog f2815j0; public int f2816k0 = -1; public class a { public a() { } @JavascriptInterface public void p0(String str, String str2) { HomeFragment.this.l().runOnUiThread(new e(this, str, str2, 2)); } @JavascriptInterface public void p1(String str) { String n9; if (str == null || str.isEmpty()) { return; } if (d.a().f5632a.getString("7", "").equals(str)) { n9 = d.a().f5632a.getString("8", ""); } else { n9 = t.n(str); } d.a().f5632a.edit().putString("7", str).commit(); d.a().f5632a.edit().putString("8", n9).commit(); FirebaseAnalytics.getInstance(f.f5639a).f3423a.a(null, "u_hed0", n9, false); } @JavascriptInterface public void p2(String str) { String n9; if (str == null || str.isEmpty()) { return; } String[] split = str.split("-"); StringBuilder sb = new StringBuilder(); int i9 = 0; while (i9 < 10) { sb.append((split.length <= i9 || !Boolean.parseBoolean(split[i9])) ? "0" : "1"); i9++; } String sb2 = sb.toString(); if (d.a().f5632a.getString("9", "").equals(sb2)) { n9 = d.a().f5632a.getString("10", ""); } else { n9 = t.n(sb2); } d.a().f5632a.edit().putString("9", sb2).commit(); d.a().f5632a.edit().putString("10", n9).commit(); FirebaseAnalytics.getInstance(f.f5639a).f3423a.a(null, "f_hed0", n9, false); } @JavascriptInterface public void p3(String str) { HomeFragment.this.l().runOnUiThread(new c((Object) this, str, 2)); } @JavascriptInterface public void p4() { HomeFragment homeFragment = HomeFragment.this; homeFragment.l().runOnUiThread(new c((Object) homeFragment, "js", 1)); } } @Override public void E(Bundle bundle) { super.E(bundle); if (!this.L) { this.L = true; if (y() && !z()) { this.C.c0(); } } this.f2811f0 = (MainActivity) l(); } @Override public View F(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) { View inflate = layoutInflater.inflate(R.layout.fragment_home, viewGroup, false); int i9 = R.id.swipe; SwipeRefreshLayout swipeRefreshLayout = (SwipeRefreshLayout) t.s(inflate, R.id.swipe); if (swipeRefreshLayout != null) { i9 = R.id.webview; WebView webView = (WebView) t.s(inflate, R.id.webview); if (webView != null) { LinearLayout linearLayout = (LinearLayout) inflate; this.f2809d0 = webView; this.f2810e0 = swipeRefreshLayout; swipeRefreshLayout.setOnRefreshListener(this); HashMap hashMap = new HashMap(); hashMap.put("accept-language", Locale.getDefault().toLanguageTag()); this.f2809d0.loadUrl("https://www.instagram.com/accounts/login", hashMap); this.f2809d0.setWebViewClient(new b(this)); this.f2809d0.setWebChromeClient(new WebChromeClient()); this.f2809d0.getSettings().setJavaScriptEnabled(true); this.f2809d0.addJavascriptInterface(new a(), "ghosterface"); this.f2809d0.getSettings().setSupportZoom(false); return linearLayout; } } throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i9))); } @Override public void H() { this.N = true; } @Override public boolean L(MenuItem menuItem) { if (menuItem.getItemId() == R.id.menu_logout) { d.a().f5632a.edit().putBoolean("3", false).commit(); WebStorage.getInstance().deleteAllData(); CookieManager.getInstance().removeAllCookies(null); CookieManager.getInstance().flush(); this.f2809d0.clearCache(true); this.f2809d0.clearFormData(); this.f2809d0.clearHistory(); this.f2809d0.clearSslPreferences(); this.f2809d0.reload(); this.f2811f0.u(); } else if (menuItem.getItemId() == R.id.menu_ghostify) { FirebaseAnalytics.getInstance(f.f5639a).a("ghost_clicked", new Bundle()); boolean z8 = !MainActivity.f2803x; MainActivity.f2803x = z8; menuItem.setIcon(z8 ? 2131165312 : 2131165311); ((MainActivity) l()).u(); WebView webView = this.f2809d0; StringBuilder t8 = androidx.activity.b.t("javascript:ghostMode="); t8.append(MainActivity.f2803x); t8.append(";"); webView.loadUrl(t8.toString()); boolean z9 = MainActivity.f2803x; } return false; } @Override public boolean a0() { if (!this.f2809d0.canGoBack()) { return false; } this.f2809d0.goBack(); return true; } public final void b0(int i9) { g1.b bVar = new g1.b(); androidx.fragment.app.a aVar = new androidx.fragment.app.a(l().o()); aVar.f(0, bVar, "auto-auth", 1); aVar.d(); AutoAuthService.f2799m = i9; Context context = f.f5639a; context.stopService(new Intent(context, (Class<?>) AutoAuthService.class)); context.startService(new Intent(context, (Class<?>) AutoAuthService.class)); } }