360手机助手 v5.2.50版本的 MD5 值为:087c008db9e518cd556c792742e6830c

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


package com.qihoo.appstore.volley.a;

import android.text.TextUtils;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volleypro.toolbox.VolleyHttpClient;
import com.qihoo.appstore.utils.AppstoreSharePref;
import com.qihoo.utils.ad;
import com.qihoo.utils.by;
import com.qihoo.utils.cn;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class a {
    public static final String[] c = {"/appstore/getisupdate", "/inew/getrecomendapps", "/appstore/getrecomendappsbytype", "/Cloud/getSoConf"};
    public int a;
    public String b;
    private final int d = 1;
    private boolean e = false;
    private boolean f = false;
    private final HashSet g = new HashSet();
    private final HashSet h = new HashSet();
    private final String[] i = {"/html/onlinegame/"};

    public void a() {
        if (!this.e) {
            d();
            e();
            b();
            c();
            this.e = true;
        }
    }

    private void c() {
        AppstoreSharePref.removeKey("update_check_urls");
        AppstoreSharePref.removeKey("update_check_urls_version");
        AppstoreSharePref.removeKey("update_check_key_content");
        AppstoreSharePref.removeKey("webview_use_https");
        AppstoreSharePref.removeKey(AppstoreSharePref.WEBVIEW_ANTIHIJACK_REGEX);
        AppstoreSharePref.removeKey(AppstoreSharePref.SUPPORT_GZIP_DOMAIN);
    }

    private void d() {
        this.f = b(true);
        Collections.addAll(this.g, this.i);
    }

    private void e() {
        this.a = b(1);
        this.b = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAsagQrTRKMG6y896gomvvsU0v yCvzmCXRUzB62vNofwVGmwaKmZP8icUeHTKQXaDZa+gln7jxtvQdVVRQzNXeYhwR woZQpTMIcEoAP2zesLJmNRMjj6spqXpieL6bRG6CnpM0PgqTIBisZtNnI/VU+v6I ArrNy9w4oYUfEIa5rwIDAQAB";
        if (this.a > 1) {
            this.b = f("");
            if (TextUtils.isEmpty(this.b)) {
                this.a = 1;
                this.b = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAsagQrTRKMG6y896gomvvsU0v yCvzmCXRUzB62vNofwVGmwaKmZP8icUeHTKQXaDZa+gln7jxtvQdVVRQzNXeYhwR woZQpTMIcEoAP2zesLJmNRMjj6spqXpieL6bRG6CnpM0PgqTIBisZtNnI/VU+v6I ArrNy9w4oYUfEIa5rwIDAQAB";
            }
        }
    }

    public void b() {
        String d = d("");
        if (!TextUtils.isEmpty(d)) {
            JSONArray jSONArray = null;
            try {
                jSONArray = new JSONArray(d);
            } catch (JSONException e) {
                e.printStackTrace();
            }
            if (jSONArray != null) {
                int length = jSONArray.length();
                for (int i = 0; i < length; i++) {
                    String optString = jSONArray.optString(i);
                    if (!TextUtils.isEmpty(optString)) {
                        this.h.add(optString.toLowerCase());
                    }
                }
            }
        }
        for (String str : c) {
            this.h.add(str.toLowerCase());
        }
    }

    public void a(JSONObject jSONObject) {
        JSONArray optJSONArray = jSONObject.optJSONArray("check_urls");
        if (optJSONArray != null && optJSONArray.toString().length() > 0) {
            c(optJSONArray.toString());
        }
        if (b(1) != jSONObject.optInt("enc_ver", 1)) {
            f();
        }
        this.f = jSONObject.optInt("wb_use_hs", 1) == 1;
        a(this.f);
    }

    public boolean a(String str) {
        if (str != null && !str.startsWith("https://")) {
            Iterator it = this.g.iterator();
            while (it.hasNext()) {
                if (str.contains((String) it.next())) {
                    return true;
                }
            }
            return false;
        }
        return false;
    }

    public boolean b(String str) {
        if (!by.a()) {
            return false;
        }
        String lowerCase = str.toLowerCase();
        if (lowerCase.startsWith("https://")) {
            return false;
        }
        Iterator it = this.h.iterator();
        while (it.hasNext()) {
            if (lowerCase.contains((String) it.next())) {
                return true;
            }
        }
        return false;
    }

    private void f() {
        String str = "https://openbox.mobilem.360.cn/iservice/getPubKey";
        if (com.qihoo.productdatainfo.b.c.b) {
            str = "http://test1.baohe.mobilem.360.cn/iservice/getPubKey";
        }
        VolleyHttpClient.getInstance().addToQueue(new JsonObjectRequest(str, null, new b(this), new c(this)));
    }

    public static void c(String str) {
        cn.a("antihijack_config", ad.a(), "update_check_urls", (Object) str);
    }

    public static String d(String str) {
        return cn.a("antihijack_config", ad.a(), "update_check_urls", str);
    }

    public static void a(int i) {
        cn.a("antihijack_config", ad.a(), "update_check_urls_version", Integer.valueOf(i));
    }

    public static int b(int i) {
        return cn.a("antihijack_config", ad.a(), "update_check_urls_version", i);
    }

    public static void e(String str) {
        cn.a("antihijack_config", ad.a(), "update_check_key_content", (Object) str);
    }

    public static String f(String str) {
        return cn.a("antihijack_config", ad.a(), "update_check_key_content", str);
    }

    public static void g(String str) {
        cn.a("antihijack_config", ad.a(), AppstoreSharePref.WEBVIEW_ANTIHIJACK_REGEX, (Object) str);
    }

    public static String h(String str) {
        return cn.a("antihijack_config", ad.a(), AppstoreSharePref.WEBVIEW_ANTIHIJACK_REGEX, str);
    }

    public static void i(String str) {
        cn.a("antihijack_config", ad.a(), AppstoreSharePref.SUPPORT_GZIP_DOMAIN, (Object) str);
    }

    public static String j(String str) {
        return cn.a("antihijack_config", ad.a(), AppstoreSharePref.SUPPORT_GZIP_DOMAIN, str);
    }

    public static void a(boolean z) {
        cn.a("antihijack_config", ad.a(), "webview_use_https", Boolean.valueOf(z));
    }

    public static boolean b(boolean z) {
        return ((Boolean) cn.b("antihijack_config", ad.a(), "webview_use_https", Boolean.valueOf(z))).booleanValue();
    }
}