搜书大师 v23.2版本的 MD5 值为:5ee433f6456b6278bd6e80a5d44df55e

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


package com.flyersoft.WB;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.os.Build;
import android.os.Handler;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.view.ViewGroup;
import com.lygame.aaa.e50;
import com.lygame.aaa.o50;
import com.lygame.aaa.rv;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class Constants {
    public static final String APPID = "1106419620";
    public static final String BANNAER_AD_TIP = "提示: 每天只允许点一次横幅广告, 点击后不再加载";
    public static final String CLICK_HIDE_AD = "<small><b>广告显示说明</b><br><br>为防止用户误点广告, 每天最多只允许点击一次开屏广告, 点击后当天将不再显示新的开屏广告.<br><br>横幅等类型广告, 同样限制为每天只允许点击一次, 之后所有这些类型广告都不再加载.</small>";
    public static final String InterteristalPosID = "3050528679050387";
    public static final long MINIMAL_AD_INTERVAL = 3000;
    public static final String NativeDicoveryID = "7070429882587425";
    public static final String NativeSearchID = "7030733115746291";
    public static final String NativeShelfID = "5080934115849280";
    public static final String RecentBannerID = "9020529719595799";
    static final String SEARCHRESULT_URL = "http://comm.moonreader.cn/mreader/third/getZKurl.do?type=1&zk_i=IMEI&zk_d=ANDROID_ID&zk_p=PHONE_BRAND";
    public static final String SPLASH_AD_TIP = "提示: 每天只允许点一次开屏广告, 点击后不再显示";
    public static final String Splash20200915 = "6031833312329958";
    public static final String SplashPosID = "8090057339034822";
    public static final String WebBannerID = "8000520609558333";
    static final String XINXILIU_URL = "http://comm.moonreader.cn/mreader/third/getZKurl.do?type=2&zk_i=IMEI&zk_d=ANDROID_ID&zk_p=PHONE_BRAND";
    private static String androidId = null;
    private static String brand = null;
    private static String imei = null;
    public static final String splash20201026 = "6071933894484332";
    public static final String splash20210822 = "3032729393120930";
    public static final long START_AD_INTERVAL = o50.N1(30);
    public static String XIN_XI_LIU = "http://car.moyumedia.com/web/jump/ssdszkjrbk0402.html?s=da1caf646044a8e5222b5d23cbf8cb6d";
    public static String SEARCH_RESULT = "https://yz.m.sm.cn/s?from=wm931778&q=%s";

    public static void createNativeAd(final Activity act, final Handler handler, final ViewGroup base, final String adID, boolean forceShow) {
        if (e50.E()) {
            if (!e50.f && !forceShow) {
                if (adID.equals(WebBannerID) && e50.g < 1) {
                    return;
                }
                if ((adID.equals(NativeDicoveryID) || adID.equals(RecentBannerID)) && e50.g < 2) {
                    return;
                }
                if (adID.equals(NativeSearchID) && e50.g < 3) {
                    return;
                }
                if (adID.equals(NativeShelfID) && e50.g < 4) {
                    return;
                }
            }
            if (adID.equals(WebBannerID) || adID.equals(RecentBannerID) || adID.equals(NativeShelfID)) {
                return;
            }
            adID.equals(NativeSearchID);
        }
    }

    public static String getAndroidId(Context context) {
        if (androidId == null) {
            try {
                androidId = Settings.Secure.getString(context.getContentResolver(), "android_id");
            } catch (Exception e) {
                e50.S0(e);
            }
            String str = androidId;
            if (str == null) {
                str = "";
            }
            androidId = str;
            e50.N5("#ANDROID_ID:" + androidId);
        }
        return androidId;
    }

    public static String getBrand() {
        if (brand == null) {
            String str = Build.BRAND;
            brand = str;
            if (str == null) {
                str = "";
            }
            brand = str;
            e50.N5("#BRAND:" + brand);
        }
        return brand;
    }

    public static String getFinalUrl(String url, String key) {
        String replace = url.replace("IMEI", getMd5(getIMEI(e50.S1()))).replace("ANDROID_ID", getMd5(getAndroidId(e50.S1()))).replace("PHONE_BRAND", getBrand());
        return !o50.F1(key) ? replace.replace("%s", S.encode(key, "utf-8")) : replace;
    }

    @SuppressLint({"MissingPermission"})
    public static String getIMEI(Context context) {
        if (imei == null) {
            try {
                imei = ((TelephonyManager) context.getSystemService("phone")).getDeviceId();
            } catch (Throwable th) {
                e50.S0(th);
            }
            String str = imei;
            if (str == null) {
                str = "";
            }
            imei = str;
            e50.N5("#IMEI:" + imei);
        }
        return imei;
    }

    public static String getMd5(String plainText) {
        try {
            MessageDigest messageDigest = MessageDigest.getInstance("MD5");
            messageDigest.update(plainText.getBytes());
            byte[] digest = messageDigest.digest();
            StringBuffer stringBuffer = new StringBuffer("");
            for (int i = 0; i < digest.length; i++) {
                int i2 = digest[i];
                if (i2 < 0) {
                    i2 += 256;
                }
                if (i2 < 16) {
                    stringBuffer.append("0");
                }
                stringBuffer.append(Integer.toHexString(i2));
            }
            return stringBuffer.toString();
        } catch (NoSuchAlgorithmException e) {
            e50.S0(e);
            return plainText;
        }
    }

    public static void showClickToHide(Context context, int type) {
        if (type == 1) {
            long j = e50.Ga;
            if (j <= 3) {
                e50.Ga = j + 1;
                o50.p2(context, e50.W0(SPLASH_AD_TIP));
            }
        }
        if (type == 2) {
            long j2 = e50.Ha;
            if (j2 <= 3) {
                e50.Ha = j2 + 1;
                o50.p2(context, e50.W0(BANNAER_AD_TIP));
            }
        }
    }

    public static void updateUrl(int type) {
        if (type == -1 || type == 0) {
            try {
                String i1 = o50.i1(getFinalUrl(XINXILIU_URL, null));
                e50.N5("@XIN_XI_LIU:" + i1);
                if (!o50.F1(i1) && i1.contains(rv.a)) {
                    XIN_XI_LIU = i1;
                }
            } catch (Exception e) {
                e50.S0(e);
                return;
            }
        }
        if (type == -1 || type == 1) {
            String i12 = o50.i1(getFinalUrl(SEARCHRESULT_URL, null));
            e50.N5("@SEARCH_RESULT:" + i12);
            if (!o50.F1(i12) && i12.contains(rv.a)) {
                SEARCH_RESULT = i12;
            }
            if (SEARCH_RESULT.contains("%s")) {
                return;
            }
            SEARCH_RESULT += "%s";
        }
    }

    public static void updateUrlThread(final int type) {
        Thread thread = new Thread() {
            @Override
            public void run() {
                Constants.updateUrl(type);
            }
        };
        thread.setPriority(1);
        thread.start();
    }
}