快樂下載apk去次數(shù)限制思路記錄

準(zhǔn)備工作:

1声离、一臺已root手機(jī)或模擬器;
2瘫怜、MT管理器(或NP管理器)术徊;
3、開發(fā)助手鲸湃;
4赠涮、快樂下載apk。

步驟:

由于apk沒加固暗挑,所以可以直接MT管理器修改笋除。

一開始是想從isvip或者getvip之類的方法名下手,但發(fā)現(xiàn)并沒有直接的修改思路(能力有限)炸裆。
不過并非一無所獲垃它,我們通過搜索vip方法名定位到Vip這個類,進(jìn)入之后烹看,最后通過閱讀代碼(如下所示)国拇,決定從判斷上面下手:

1.jpg

2.jpg

Vip類中的內(nèi)容:
# classes12.dex

.class public Lcom/one/downloadtools/ui/user/Vip;
.super Ljava/lang/Object;


# static fields
.field private static format:Ljava/text/SimpleDateFormat;


# direct methods
.method static constructor <clinit>()V
    .registers 2

    const/16 v0, 0x85

    invoke-static {v0}, Lcom/nmmedit/protect/NativeUtil;->classes12Init0(I)V

    .line 25
    new-instance v0, Ljava/text/SimpleDateFormat;

    const-string v1, "yyyyMMdd"

    invoke-direct {v0, v1}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    sput-object v0, Lcom/one/downloadtools/ui/user/Vip;->format:Ljava/text/SimpleDateFormat;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

    .line 23
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method static synthetic access$000()Ljava/lang/String;
    .registers 1

    .line 23
    invoke-static {}, Lcom/one/downloadtools/ui/user/Vip;->getDayKey()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static native can(Landroid/content/Context;Ljava/lang/String;I)Lio/reactivex/rxjava3/core/Observable;
    .annotation system Ldalvik/annotation/MethodParameters;
        accessFlags = {
            0x0,
            0x0,
            0x0
        }
        names = {
            "context",
            "also",
            "count"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/lang/String;",
            "I)",
            "Lio/reactivex/rxjava3/core/Observable<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end method

.method public static native canAndDo(Ljava/lang/String;I)Z
    .annotation system Ldalvik/annotation/MethodParameters;
        accessFlags = {
            0x0,
            0x0
        }
        names = {
            "also",
            "count"
        }
    .end annotation
.end method

.method private static native getDayKey()Ljava/lang/String;
.end method

.method static synthetic lambda$can$0(Landroid/content/Context;Ljava/lang/String;ILio/reactivex/rxjava3/core/ObservableEmitter;Lcom/one/downloadtools/http/Response;)V
    .registers 14
    .param p0, "context"  # Landroid/content/Context;
    .param p1, "also"  # Ljava/lang/String;
    .param p2, "todayCount"  # I
    .param p3, "observableEmitter"  # Lio/reactivex/rxjava3/core/ObservableEmitter;
    .param p4, "res"  # Lcom/one/downloadtools/http/Response;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Throwable;
        }
    .end annotation

    .line 69
    invoke-virtual {p4}, Lcom/one/downloadtools/http/Response;->getShops()Ljava/util/List;

    move-result-object v0

    if-nez v0, :cond_c

    .line 70
    const-string v0, "獲取信息失敗,請檢查您的網(wǎng)絡(luò)"

    invoke-static {v0}, Lcom/one/hostpoll/util/ToastUtils;->toast(Ljava/lang/String;)V

    .line 71
    return-void

    .line 73
    :cond_c
    new-instance v0, Lcom/lxj/xpopup/XPopup$Builder;

    invoke-direct {v0, p0}, Lcom/lxj/xpopup/XPopup$Builder;-><init>(Landroid/content/Context;)V

    .line 74
    const/4 v1, 0x0

    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/lxj/xpopup/XPopup$Builder;->dismissOnTouchOutside(Ljava/lang/Boolean;)Lcom/lxj/xpopup/XPopup$Builder;

    move-result-object v0

    .line 75
    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/lxj/xpopup/XPopup$Builder;->dismissOnBackPressed(Ljava/lang/Boolean;)Lcom/lxj/xpopup/XPopup$Builder;

    move-result-object v0

    new-instance v8, Lcom/one/downloadtools/ui/user/Vip$1;

    move-object v1, v8

    move-object v2, p0

    move-object v3, p4

    move-object v4, p1

    move v5, p2

    move-object v6, p3

    move-object v7, p0

    invoke-direct/range {v1 .. v7}, Lcom/one/downloadtools/ui/user/Vip$1;-><init>(Landroid/content/Context;Lcom/one/downloadtools/http/Response;Ljava/lang/String;ILio/reactivex/rxjava3/core/ObservableEmitter;Landroid/content/Context;)V

    .line 76
    invoke-virtual {v0, v8}, Lcom/lxj/xpopup/XPopup$Builder;->asCustom(Lcom/lxj/xpopup/core/BasePopupView;)Lcom/lxj/xpopup/core/BasePopupView;

    move-result-object v0

    .line 107
    invoke-virtual {v0}, Lcom/lxj/xpopup/core/BasePopupView;->show()Lcom/lxj/xpopup/core/BasePopupView;

    .line 108
    return-void
.end method

.method static synthetic lambda$can$1(Landroid/content/Context;Lcom/one/downloadtools/http/Response;)V
    .registers 4
    .param p0, "context"  # Landroid/content/Context;
    .param p1, "res"  # Lcom/one/downloadtools/http/Response;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Throwable;
        }
    .end annotation

    .line 115
    new-instance v0, Lcom/lxj/xpopup/XPopup$Builder;

    invoke-direct {v0, p0}, Lcom/lxj/xpopup/XPopup$Builder;-><init>(Landroid/content/Context;)V

    .line 116
    const/4 v1, 0x0

    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/lxj/xpopup/XPopup$Builder;->dismissOnTouchOutside(Ljava/lang/Boolean;)Lcom/lxj/xpopup/XPopup$Builder;

    move-result-object v0

    .line 117
    invoke-virtual {v0, v1}, Lcom/lxj/xpopup/XPopup$Builder;->dismissOnBackPressed(Ljava/lang/Boolean;)Lcom/lxj/xpopup/XPopup$Builder;

    move-result-object v0

    new-instance v1, Lcom/one/downloadtools/ui/user/Vip$2;

    invoke-direct {v1, p0, p1, p0}, Lcom/one/downloadtools/ui/user/Vip$2;-><init>(Landroid/content/Context;Lcom/one/downloadtools/http/Response;Landroid/content/Context;)V

    .line 118
    invoke-virtual {v0, v1}, Lcom/lxj/xpopup/XPopup$Builder;->asCustom(Lcom/lxj/xpopup/core/BasePopupView;)Lcom/lxj/xpopup/core/BasePopupView;

    move-result-object v0

    .line 147
    invoke-virtual {v0}, Lcom/lxj/xpopup/core/BasePopupView;->show()Lcom/lxj/xpopup/core/BasePopupView;

    .line 148
    return-void
.end method

.method static synthetic lambda$can$2(Lio/reactivex/rxjava3/core/ObservableEmitter;Ljava/lang/Throwable;)V
    .registers 2
    .param p0, "observableEmitter"  # Lio/reactivex/rxjava3/core/ObservableEmitter;
    .param p1, "e"  # Ljava/lang/Throwable;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Throwable;
        }
    .end annotation

    .line 149
    invoke-interface {p0, p1}, Lio/reactivex/rxjava3/core/ObservableEmitter;->onError(Ljava/lang/Throwable;)V

    .line 150
    return-void
.end method

.method static synthetic lambda$can$3(Ljava/lang/String;ILandroid/content/Context;Lio/reactivex/rxjava3/core/ObservableEmitter;)V
    .registers 10
    .param p0, "also"  # Ljava/lang/String;
    .param p1, "count"  # I
    .param p2, "context"  # Landroid/content/Context;
    .param p3, "observableEmitter"  # Lio/reactivex/rxjava3/core/ObservableEmitter;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Throwable;
        }
    .end annotation

    .line 59
    invoke-static {}, Lcom/one/downloadtools/ui/user/Vip;->refresh()V

    .line 60
    invoke-static {}, Lcom/one/downloadtools/ui/user/AppPref;->get()Lcom/one/downloadtools/ui/user/AppPref;

    move-result-object v0

    invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/AppPref;->getUserInfo()Lcom/one/downloadtools/ui/user/m/UserInfo;

    move-result-object v0

    .line 61
    .local v0, "info":Lcom/one/downloadtools/ui/user/m/UserInfo;
    if-eqz v0, :cond_2f

    invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/m/UserInfo;->getVip()I

    move-result v1

    const/16 v2, 0x5e

    if-eq v1, v2, :cond_25

    invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/m/UserInfo;->getVip()I

    move-result v1

    const/16 v2, 0x5d

    if-eq v1, v2, :cond_25

    invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/m/UserInfo;->getVip()I

    move-result v1

    const/16 v2, 0x64

    if-ne v1, v2, :cond_2f

    .line 62
    :cond_25
    const/4 v1, -0x1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {p3, v1}, Lio/reactivex/rxjava3/core/ObservableEmitter;->onNext(Ljava/lang/Object;)V

    goto/16 :goto_d0

    .line 64
    :cond_2f
    invoke-static {}, Lcom/one/downloadtools/config/NativeConfig;->getInstance()Lcom/one/downloadtools/config/NativeConfig;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/one/downloadtools/ui/user/Vip;->getDayKey()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, "_"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/one/downloadtools/config/NativeConfig;->readInt(Ljava/lang/String;)I

    move-result v1

    .line 65
    .local v1, "todayCount":I
    sget-object v2, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "今日已使用:"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v4}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 66
    if-ge v1, p1, :cond_b3

    .line 67
    if-nez v1, :cond_8a

    .line 68
    invoke-static {}, Lcom/one/downloadtools/http/HttpClient;->getApi()Lcom/one/downloadtools/http/Api;

    move-result-object v2

    invoke-interface {v2}, Lcom/one/downloadtools/http/Api;->getShops()Lio/reactivex/rxjava3/core/Observable;

    move-result-object v2

    invoke-static {}, Lcom/one/downloadtools/ui/user/RxPlugin;->fromNewToMainThread()Lio/reactivex/rxjava3/core/ObservableTransformer;

    move-result-object v3

    invoke-virtual {v2, v3}, Lio/reactivex/rxjava3/core/Observable;->compose(Lio/reactivex/rxjava3/core/ObservableTransformer;)Lio/reactivex/rxjava3/core/Observable;

    move-result-object v2

    new-instance v3, Lcom/one/downloadtools/ui/user/-$$Lambda$Vip$zK7SieMyZ-Sq4SwE-E0hqmeyZk4;

    invoke-direct {v3, p2, p0, v1, p3}, Lcom/one/downloadtools/ui/user/-$$Lambda$Vip$zK7SieMyZ-Sq4SwE-E0hqmeyZk4;-><init>(Landroid/content/Context;Ljava/lang/String;ILio/reactivex/rxjava3/core/ObservableEmitter;)V

    .line 108
    invoke-static {p3}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    new-instance v4, Lcom/one/downloadtools/ui/user/-$$Lambda$9V4x4hT-pqcFjlu4mhGdRyjZzlw;

    invoke-direct {v4, p3}, Lcom/one/downloadtools/ui/user/-$$Lambda$9V4x4hT-pqcFjlu4mhGdRyjZzlw;-><init>(Lio/reactivex/rxjava3/core/ObservableEmitter;)V

    .line 68
    invoke-virtual {v2, v3, v4}, Lio/reactivex/rxjava3/core/Observable;->subscribe(Lio/reactivex/rxjava3/functions/Consumer;Lio/reactivex/rxjava3/functions/Consumer;)Lio/reactivex/rxjava3/disposables/Disposable;

    goto :goto_d0

    .line 110
    :cond_8a
    invoke-static {}, Lcom/one/downloadtools/config/NativeConfig;->getInstance()Lcom/one/downloadtools/config/NativeConfig;

    move-result-object v2

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/one/downloadtools/ui/user/Vip;->getDayKey()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    add-int/lit8 v4, v1, 0x1

    invoke-virtual {v2, v3, v4}, Lcom/one/downloadtools/config/NativeConfig;->putInt(Ljava/lang/String;I)V

    .line 111
    add-int/lit8 v2, v1, 0x1

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-interface {p3, v2}, Lio/reactivex/rxjava3/core/ObservableEmitter;->onNext(Ljava/lang/Object;)V

    goto :goto_d0

    .line 114
    :cond_b3
    invoke-static {}, Lcom/one/downloadtools/http/HttpClient;->getApi()Lcom/one/downloadtools/http/Api;

    move-result-object v2

    invoke-interface {v2}, Lcom/one/downloadtools/http/Api;->getShops()Lio/reactivex/rxjava3/core/Observable;

    move-result-object v2

    invoke-static {}, Lcom/one/downloadtools/ui/user/RxPlugin;->fromNewToMainThread()Lio/reactivex/rxjava3/core/ObservableTransformer;

    move-result-object v3

    invoke-virtual {v2, v3}, Lio/reactivex/rxjava3/core/Observable;->compose(Lio/reactivex/rxjava3/core/ObservableTransformer;)Lio/reactivex/rxjava3/core/Observable;

    move-result-object v2

    new-instance v3, Lcom/one/downloadtools/ui/user/-$$Lambda$Vip$JC0r5-ftHAi3IGOWgJtQmErslSI;

    invoke-direct {v3, p2}, Lcom/one/downloadtools/ui/user/-$$Lambda$Vip$JC0r5-ftHAi3IGOWgJtQmErslSI;-><init>(Landroid/content/Context;)V

    new-instance v4, Lcom/one/downloadtools/ui/user/-$$Lambda$Vip$SXjn20c6grLvbhfrrdIaMPmapr0;

    invoke-direct {v4, p3}, Lcom/one/downloadtools/ui/user/-$$Lambda$Vip$SXjn20c6grLvbhfrrdIaMPmapr0;-><init>(Lio/reactivex/rxjava3/core/ObservableEmitter;)V

    invoke-virtual {v2, v3, v4}, Lio/reactivex/rxjava3/core/Observable;->subscribe(Lio/reactivex/rxjava3/functions/Consumer;Lio/reactivex/rxjava3/functions/Consumer;)Lio/reactivex/rxjava3/disposables/Disposable;

    .line 153
    .end local v1  # "todayCount":I
    :goto_d0
    return-void
.end method

.method static synthetic lambda$refresh$4(Lcom/one/downloadtools/http/Response;)V
    .registers 3
    .param p0, "res"  # Lcom/one/downloadtools/http/Response;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Throwable;
        }
    .end annotation

    .line 162
    invoke-virtual {p0}, Lcom/one/downloadtools/http/Response;->getCode()I

    move-result v0

    const/16 v1, 0xc8

    if-ne v0, v1, :cond_15

    .line 163
    invoke-static {}, Lcom/one/downloadtools/ui/user/AppPref;->get()Lcom/one/downloadtools/ui/user/AppPref;

    move-result-object v0

    invoke-virtual {p0}, Lcom/one/downloadtools/http/Response;->getData()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/one/downloadtools/ui/user/m/UserInfo;

    invoke-virtual {v0, v1}, Lcom/one/downloadtools/ui/user/AppPref;->setUserInfo(Lcom/one/downloadtools/ui/user/m/UserInfo;)V

    .line 165
    :cond_15
    return-void
.end method

.method static synthetic lambda$refresh$5(Ljava/lang/Throwable;)V
    .registers 1
    .param p0, "e"  # Ljava/lang/Throwable;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Throwable;
        }
    .end annotation

    .line 165
    return-void
.end method

.method private static native refresh()V
.end method

.method public static native showVip(Landroid/content/Context;)V
    .annotation system Ldalvik/annotation/MethodParameters;
        accessFlags = {
            0x1
        }
        names = {
            "context"
        }
    .end annotation
.end method

.method public static native to(Landroid/content/Context;)V
    .annotation system Ldalvik/annotation/MethodParameters;
        accessFlags = {
            0x0
        }
        names = {
            "context"
        }
    .end annotation
.end method

轉(zhuǎn)化為java代碼查看:

//
// Decompiled by Jadx - 780ms
//
package com.one.downloadtools.ui.user;

import android.content.Context;
import com.lxj.xpopup.XPopup;
import com.nmmedit.protect.NativeUtil;
import com.one.downloadtools.config.NativeConfig;
import com.one.downloadtools.http.HttpClient;
import com.one.downloadtools.http.Response;
import com.one.downloadtools.ui.user.-$;
import com.one.downloadtools.ui.user.m.UserInfo;
import com.one.hostpoll.util.ToastUtils;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.core.ObservableEmitter;
import java.io.PrintStream;
import java.text.SimpleDateFormat;
import java.util.Objects;

public class Vip {
    private static SimpleDateFormat format;

    public static native Observable<Integer> can(Context context, String also, int count);

    public static native boolean canAndDo(String also, int count);

    public static native String getDayKey();

    private static native void refresh();

    public static native void showVip(Context context);

    public static native void to(Context context);

    static {
        NativeUtil.classes12Init0(133);
        format = new SimpleDateFormat("yyyyMMdd");
    }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓關(guān)鍵片段↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    static void lambda$can$3(String also, int count, Context context, ObservableEmitter observableEmitter) throws Throwable {
        refresh();
        UserInfo info = AppPref.get().getUserInfo();
        if (info != null && (info.getVip() == 94 || info.getVip() == 93 || info.getVip() == 100)) {
            observableEmitter.onNext(-1);
            return;
        }
        NativeConfig nativeConfig = NativeConfig.getInstance();
        int todayCount = nativeConfig.readInt(getDayKey() + "_" + also);
        PrintStream printStream = System.out;
        printStream.println("今日已使用:" + todayCount);
        if (todayCount < count) {
            if (todayCount == 0) {
                Observable compose = HttpClient.getApi().getShops().compose(RxPlugin.fromNewToMainThread());
                -$.Lambda.Vip.zK7SieMyZ-Sq4SwE-E0hqmeyZk4 r3 = new -$.Lambda.Vip.zK7SieMyZ-Sq4SwE-E0hqmeyZk4(context, also, todayCount, observableEmitter);
                Objects.requireNonNull(observableEmitter);
                compose.subscribe(r3, new -$.Lambda.9V4x4hT-pqcFjlu4mhGdRyjZzlw(observableEmitter));
                return;
            }
            NativeConfig nativeConfig2 = NativeConfig.getInstance();
            nativeConfig2.putInt(getDayKey() + "_" + also, todayCount + 1);
            observableEmitter.onNext(Integer.valueOf(todayCount + 1));
            return;
        }
        HttpClient.getApi().getShops().compose(RxPlugin.fromNewToMainThread()).subscribe(new -$.Lambda.Vip.JC0r5-ftHAi3IGOWgJtQmErslSI(context), new -$.Lambda.Vip.SXjn20c6grLvbhfrrdIaMPmapr0(observableEmitter));
    }
↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑關(guān)鍵片段↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static void lambda$can$0(Context context, String also, int todayCount, ObservableEmitter observableEmitter, Response res) throws Throwable {
        if (res.getShops() == null) {
            ToastUtils.toast("獲取信息失敗听系,請檢查您的網(wǎng)絡(luò)");
        } else {
            new XPopup.Builder(context).dismissOnTouchOutside(false).dismissOnBackPressed(false).asCustom(new Vip$1(context, res, also, todayCount, observableEmitter, context)).show();
        }
    }

    static void lambda$refresh$4(Response res) throws Throwable {
        if (res.getCode() == 200) {
            AppPref.get().setUserInfo((UserInfo) res.getData());
        }
    }

    static void lambda$refresh$5(Throwable e) throws Throwable {
    }
}

其中最重要的部分就是包含判斷的部分:

    static void lambda$can$3(String also, int count, Context context, ObservableEmitter observableEmitter) throws Throwable {
        refresh();
        UserInfo info = AppPref.get().getUserInfo();
        if (info != null && (info.getVip() == 94 || info.getVip() == 93 || info.getVip() == 100)) {
            observableEmitter.onNext(-1);
            return;
        }
        NativeConfig nativeConfig = NativeConfig.getInstance();
        int todayCount = nativeConfig.readInt(getDayKey() + "_" + also);
        PrintStream printStream = System.out;
        printStream.println("今日已使用:" + todayCount);
        if (todayCount < count) {
            if (todayCount == 0) {
                Observable compose = HttpClient.getApi().getShops().compose(RxPlugin.fromNewToMainThread());
                -$.Lambda.Vip.zK7SieMyZ-Sq4SwE-E0hqmeyZk4 r3 = new -$.Lambda.Vip.zK7SieMyZ-Sq4SwE-E0hqmeyZk4(context, also, todayCount, observableEmitter);
                Objects.requireNonNull(observableEmitter);
                compose.subscribe(r3, new -$.Lambda.9V4x4hT-pqcFjlu4mhGdRyjZzlw(observableEmitter));
                return;
            }
            NativeConfig nativeConfig2 = NativeConfig.getInstance();
            nativeConfig2.putInt(getDayKey() + "_" + also, todayCount + 1);
            observableEmitter.onNext(Integer.valueOf(todayCount + 1));
            return;
        }
        HttpClient.getApi().getShops().compose(RxPlugin.fromNewToMainThread()).subscribe(new -$.Lambda.Vip.JC0r5-ftHAi3IGOWgJtQmErslSI(context), new -$.Lambda.Vip.SXjn20c6grLvbhfrrdIaMPmapr0(observableEmitter));
    }

通過閱讀可知該段代碼大致意思為贝奇,判斷info.Getvip()返回的值是否非空并且等于94、93靠胜、100其中一個數(shù)字掉瞳,是則執(zhí)行observableEmitter.onNext(-1);,否則返回繼續(xù)執(zhí)行后續(xù)代碼浪漠,根據(jù)實(shí)際使用可推測后續(xù)代碼是非vip的情況下計(jì)算每日免費(fèi)使用次數(shù)陕习,我們并不希望執(zhí)行的部分。

通過對java代碼的解讀址愿,可以回去看前面的smali代碼该镣,很快定位到判斷相關(guān)的代碼:

    .line 61
    .local v0, "info":Lcom/one/downloadtools/ui/user/m/UserInfo;
    if-eqz v0, :cond_2f    //判斷v0是否等于0,是則跳轉(zhuǎn)到cond_2f

    invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/m/UserInfo;->getVip()I

    move-result v1

    const/16 v2, 0x5e      // v2的值是5e响谓,也就是十進(jìn)制的94

    if-eq v1, v2, :cond_25   //如果v1等于v2损合,則跳轉(zhuǎn)到cond_25

    invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/m/UserInfo;->getVip()I

    move-result v1

    const/16 v2, 0x5d   // v2的值是5d省艳,也就是十進(jìn)制的93

    if-eq v1, v2, :cond_25      //如果v1等于v2暇咆,則跳轉(zhuǎn)到cond_25

    invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/m/UserInfo;->getVip()I

    move-result v1

    const/16 v2, 0x64  // v2的值是64星著,也就是十進(jìn)制的100

    if-ne v1, v2, :cond_2f  //如果v1不等于v2,則跳轉(zhuǎn)到cond_2f

那么此時就明朗了茵肃,我們的目標(biāo)就是不管v0是否為空律适,v1v2是否相等辐烂,我們都跳轉(zhuǎn)到cond_25而不進(jìn)入原來的cond_2f,所以我們只需要將cond_2f都修改為cond_25即可:

3.jpg

保存簽名安裝捂贿。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末纠修,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子厂僧,更是在濱河造成了極大的恐慌扣草,老刑警劉巖,帶你破解...
    沈念sama閱讀 221,273評論 6 515
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件吁系,死亡現(xiàn)場離奇詭異德召,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)汽纤,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,349評論 3 398
  • 文/潘曉璐 我一進(jìn)店門上岗,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人蕴坪,你說我怎么就攤上這事肴掷。” “怎么了背传?”我有些...
    開封第一講書人閱讀 167,709評論 0 360
  • 文/不壞的土叔 我叫張陵呆瞻,是天一觀的道長。 經(jīng)常有香客問我径玖,道長痴脾,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 59,520評論 1 296
  • 正文 為了忘掉前任梳星,我火速辦了婚禮赞赖,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘冤灾。我一直安慰自己前域,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 68,515評論 6 397
  • 文/花漫 我一把揭開白布韵吨。 她就那樣靜靜地躺著匿垄,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上椿疗,一...
    開封第一講書人閱讀 52,158評論 1 308
  • 那天漏峰,我揣著相機(jī)與錄音,去河邊找鬼变丧。 笑死芽狗,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的痒蓬。 我是一名探鬼主播,決...
    沈念sama閱讀 40,755評論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼滴劲,長吁一口氣:“原來是場噩夢啊……” “哼攻晒!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起班挖,我...
    開封第一講書人閱讀 39,660評論 0 276
  • 序言:老撾萬榮一對情侶失蹤鲁捏,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后萧芙,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體给梅,經(jīng)...
    沈念sama閱讀 46,203評論 1 319
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,287評論 3 340
  • 正文 我和宋清朗相戀三年双揪,在試婚紗的時候發(fā)現(xiàn)自己被綠了动羽。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 40,427評論 1 352
  • 序言:一個原本活蹦亂跳的男人離奇死亡渔期,死狀恐怖运吓,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情疯趟,我是刑警寧澤拘哨,帶...
    沈念sama閱讀 36,122評論 5 349
  • 正文 年R本政府宣布,位于F島的核電站信峻,受9級特大地震影響倦青,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜盹舞,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,801評論 3 333
  • 文/蒙蒙 一产镐、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧矾策,春花似錦磷账、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,272評論 0 23
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春绰咽,著一層夾襖步出監(jiān)牢的瞬間菇肃,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,393評論 1 272
  • 我被黑心中介騙來泰國打工取募, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留琐谤,地道東北人。 一個月前我還...
    沈念sama閱讀 48,808評論 3 376
  • 正文 我出身青樓玩敏,卻偏偏與公主長得像斗忌,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子旺聚,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,440評論 2 359

推薦閱讀更多精彩內(nèi)容