万能钥匙.apk(点击下载) / j.java


package com.linksure.browser.webcore;

import android.text.TextUtils;
import com.alibaba.fastjson.JSONArray;
import com.linksure.browser.config.b;
import com.linksure.browser.utils.r;
import com.linksure.browser.utils.v;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;

/* compiled from: WebPageManager */
public final class j {

    /* renamed from: a  reason: collision with root package name */
    public static List<String> f7511a = new ArrayList<String>() {
        /* class com.linksure.browser.webcore.j.AnonymousClass1 */

        {
            add("baidu.*://utils?");
            add("baidu*://");
        }
    };

    /* renamed from: b  reason: collision with root package name */
    public static List<String> f7512b = new ArrayList<String>() {
        /* class com.linksure.browser.webcore.j.AnonymousClass2 */

        {
            add("wkhideTitle=");
            add("https://kuaibao.qq.com/hotList");
        }
    };

    public static boolean a(String str) {
        try {
            for (String str2 : f7511a) {
                if (Pattern.compile(str2).matcher(str).find()) {
                    return true;
                }
            }
            return false;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }

    public static boolean b(String str) {
        try {
            ArrayList<String> b2 = b.a().b();
            if (b2 == null || b2.size() <= 0) {
                return false;
            }
            for (int i = 0; i < b2.size(); i++) {
                if (str.startsWith(b2.get(i))) {
                    return true;
                }
            }
            return false;
        } catch (Exception unused) {
            return false;
        }
    }

    public static boolean c(String str) {
        try {
            for (String str2 : f7512b) {
                if (Pattern.compile(str2).matcher(str).find()) {
                    return true;
                }
            }
            return false;
        } catch (Exception unused) {
            return false;
        }
    }

    public static boolean d(String str) {
        boolean z;
        try {
            JSONArray c = r.c();
            for (int i = 0; i < c.size(); i++) {
                String e = v.e(c.getJSONObject(i).getString("u"));
                URL url = new URL(str);
                if (TextUtils.isEmpty(url.getRef())) {
                    if (url.getPath().length() <= 1) {
                        z = false;
                        if ((z && str.contains("s?word=")) || str.contains("s?&word=")) {
                            z = false;
                        }
                        if (!(TextUtils.equals(v.e(str), e) || z)) {
                            return true;
                        }
                    }
                }
                z = true;
                z = false;
                if (TextUtils.equals(v.e(str), e)) {
                }
            }
        } catch (Exception e2) {
            e2.printStackTrace();
        }
        return false;
    }
}