feng5210741 发表于 2019-9-6 15:20

安卓某软件逆向求教

本帖最后由 feng5210741 于 2019-9-10 09:39 编辑

本人萌新小白一枚,在学习安卓逆向需要轮他大神帮忙指导下:lol这个软件想要破解注册码部分需要如何操作,下面是源代码{:1_919:}


[.class Lcom/finegps/idog/activity/ActiveDialogActivity$1;
.super Ljava/lang/Object;
.source "ActiveDialogActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/finegps/idog/activity/ActiveDialogActivity;->initView()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/finegps/idog/activity/ActiveDialogActivity;


# direct methods
.method constructor <init>(Lcom/finegps/idog/activity/ActiveDialogActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/finegps/idog/activity/ActiveDialogActivity$1;->this$0:Lcom/finegps/idog/activity/ActiveDialogActivity;

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

    return-void
.end method

.method static synthetic access$0(Lcom/finegps/idog/activity/ActiveDialogActivity$1;)Lcom/finegps/idog/activity/ActiveDialogActivity;
    .locals 1

    .prologue
    .line 65
    iget-object v0, p0, Lcom/finegps/idog/activity/ActiveDialogActivity$1;->this$0:Lcom/finegps/idog/activity/ActiveDialogActivity;

    return-object v0
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 9
    .param p1, "v"    # Landroid/view/View;

    .prologue
    const/4 v8, 0x0

    .line 70
    iget-object v6, p0, Lcom/finegps/idog/activity/ActiveDialogActivity$1;->this$0:Lcom/finegps/idog/activity/ActiveDialogActivity;

    invoke-static {v6}, Lcom/finegps/idog/activity/ActiveDialogActivity;->access$0(Lcom/finegps/idog/activity/ActiveDialogActivity;)Landroid/widget/EditText;

    move-result-object v6

    invoke-virtual {v6}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v6

    invoke-interface {v6}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    .line 71
    .local v4, "imei":Ljava/lang/String;
    iget-object v6, p0, Lcom/finegps/idog/activity/ActiveDialogActivity$1;->this$0:Lcom/finegps/idog/activity/ActiveDialogActivity;

    invoke-static {v6}, Lcom/finegps/idog/activity/ActiveDialogActivity;->access$1(Lcom/finegps/idog/activity/ActiveDialogActivity;)Landroid/widget/EditText;

    move-result-object v6

    invoke-virtual {v6}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v6

    invoke-interface {v6}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v1

    .line 72
    .local v1, "activeCode":Ljava/lang/String;
    if-eqz v4, :cond_0

    if-eqz v1, :cond_0

    .line 73
    invoke-virtual {v4}, Ljava/lang/String;->length()I

    move-result v6

    new-array v5, v6, [C

    .line 74
    .local v5, "imeiChar":[C
    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v6

    new-array v0, v6, [C

    .line 75
    .local v0, "acodeChar":[C
    invoke-virtual {v4}, Ljava/lang/String;->toCharArray()[C

    move-result-object v5

    .line 76
    invoke-virtual {v1}, Ljava/lang/String;->toCharArray()[C

    move-result-object v0

    .line 77
    invoke-static {v5, v0}, Lcom/finegps/utils/SearchCamerUtils;->ActiveApp([C[C)Ljava/lang/String;

    move-result-object v2

    .line 79
    .local v2, "activeResult":Ljava/lang/String;
    const-string v6, "1"

    invoke-virtual {v2, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_1

    .line 80
    iget-object v6, p0, Lcom/finegps/idog/activity/ActiveDialogActivity$1;->this$0:Lcom/finegps/idog/activity/ActiveDialogActivity;

    const-string v7, "\u6fc0\u6d3b\u6210\u529f\uff01"

    invoke-static {v6, v7, v8}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v6

    .line 81
    invoke-virtual {v6}, Landroid/widget/Toast;->show()V

    .line 82
    iget-object v6, p0, Lcom/finegps/idog/activity/ActiveDialogActivity$1;->this$0:Lcom/finegps/idog/activity/ActiveDialogActivity;

    invoke-static {v6}, Lcom/finegps/idog/activity/ActiveDialogActivity;->access$2(Lcom/finegps/idog/activity/ActiveDialogActivity;)Landroid/content/SharedPreferences;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    const-string v7, "isActive"

    const/4 v8, 0x1

    invoke-interface {v6, v7, v8}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 83
    iget-object v6, p0, Lcom/finegps/idog/activity/ActiveDialogActivity$1;->this$0:Lcom/finegps/idog/activity/ActiveDialogActivity;

    invoke-static {v6}, Lcom/finegps/idog/activity/ActiveDialogActivity;->access$2(Lcom/finegps/idog/activity/ActiveDialogActivity;)Landroid/content/SharedPreferences;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    const-string v7, "JH_CODE"

    invoke-interface {v6, v7, v1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 107
    :goto_0
    iget-object v6, p0, Lcom/finegps/idog/activity/ActiveDialogActivity$1;->this$0:Lcom/finegps/idog/activity/ActiveDialogActivity;

    invoke-virtual {v6}, Lcom/finegps/idog/activity/ActiveDialogActivity;->finish()V

    .line 109
    .end local v0    # "acodeChar":[C
    .end local v2    # "activeResult":Ljava/lang/String;
    .end local v5    # "imeiChar":[C
    :cond_0
    return-void

    .line 85
    .restart local v0    # "acodeChar":[C
    .restart local v2    # "activeResult":Ljava/lang/String;
    .restart local v5    # "imeiChar":[C
    :cond_1
    iget-object v6, p0, Lcom/finegps/idog/activity/ActiveDialogActivity$1;->this$0:Lcom/finegps/idog/activity/ActiveDialogActivity;

    invoke-static {v6}, Lcom/finegps/idog/activity/ActiveDialogActivity;->access$2(Lcom/finegps/idog/activity/ActiveDialogActivity;)Landroid/content/SharedPreferences;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    const-string v7, "isActive"

    invoke-interface {v6, v7, v8}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v6

    invoke-interface {v6}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 86
    new-instance v3, Landroid/app/AlertDialog$Builder;

    .line 87
    iget-object v6, p0, Lcom/finegps/idog/activity/ActiveDialogActivity$1;->this$0:Lcom/finegps/idog/activity/ActiveDialogActivity;

    .line 86
    invoke-direct {v3, v6}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 88
    .local v3, "builder":Landroid/app/AlertDialog$Builder;
    const v6, 0x7f020040

    invoke-virtual {v3, v6}, Landroid/app/AlertDialog$Builder;->setIcon(I)Landroid/app/AlertDialog$Builder;

    .line 89
    const-string v6, "\u63d0\u793a"

    invoke-virtual {v3, v6}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 90
    const-string v6, "\u6fc0\u6d3b\u5931\u8d25\uff0c\u8bf7\u91cd\u65b0\u6fc0\u6d3b\uff01"

    invoke-virtual {v3, v6}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 91
    const-string v6, "\u91cd\u65b0\u6fc0\u6d3b"

    .line 92
    new-instance v7, Lcom/finegps/idog/activity/ActiveDialogActivity$1$1;

    invoke-direct {v7, p0}, Lcom/finegps/idog/activity/ActiveDialogActivity$1$1;-><init>(Lcom/finegps/idog/activity/ActiveDialogActivity$1;)V

    .line 91
    invoke-virtual {v3, v6, v7}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 98
    const-string v6, "\u6682\u4e0d\u6fc0\u6d3b"

    .line 99
    new-instance v7, Lcom/finegps/idog/activity/ActiveDialogActivity$1$2;

    invoke-direct {v7, p0}, Lcom/finegps/idog/activity/ActiveDialogActivity$1$2;-><init>(Lcom/finegps/idog/activity/ActiveDialogActivity$1;)V

    .line 98
    invoke-virtual {v3, v6, v7}, Landroid/app/AlertDialog$Builder;->setNegativeButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 105
    invoke-virtual {v3}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v6

    invoke-virtual {v6}, Landroid/app/AlertDialog;->show()V

    goto :goto_0
.end method

附上软件:链接: https://pan.baidu.com/s/1-DaFxEl33VeffiLoL4SMhg 提取码: c8m7                谢谢大神

风绕柳絮轻敲雪 发表于 2019-9-6 15:40

本帖最后由 风绕柳絮轻敲雪 于 2019-9-6 15:46 编辑

你就不能加个代码框吗
看的眼睛疼
主要看onclick方法里的代码就知道了

说一下简单的两种破解方式
1.暴力破解,强制跳转到判断成功
2.注册码破解,判断上面有注册码的详细算法,挺简单的算法

丶咖啡猫丶 发表于 2019-9-6 17:21

发一下程序出来,看看吧

feng5210741 发表于 2019-9-9 08:29

风绕柳絮轻敲雪 发表于 2019-9-6 15:40
你就不能加个代码框吗
看的眼睛疼
主要看onclick方法里的代码就知道了


哈哈怎么加代码框{:1_925:} GOTO 语句加在哪里跳啊,求解:lol

风绕柳絮轻敲雪 发表于 2019-9-9 20:57

feng5210741 发表于 2019-9-9 08:29
哈哈怎么加代码框 GOTO 语句加在哪里跳啊,求解

两个尖括号的那个,你在代码不完整

feng5210741 发表于 2019-9-10 09:39

丶咖啡猫丶 发表于 2019-9-6 17:21
发一下程序出来,看看吧

链接: https://pan.baidu.com/s/1-DaFxEl33VeffiLoL4SMhg 提取码: c8m7    帮我看看大神

wabc666 发表于 2019-9-11 16:41

链接:https://pan.baidu.com/s/1pCV4O-AuFBGuAslnoOo2Bw
提取码:iyts
复制这段内容后打开百度网盘手机App,操作更方便哦

不谢!

feng5210741 发表于 2019-10-16 14:07

谢谢大牛

feng5210741 发表于 2019-10-16 14:08

wabc666 发表于 2019-9-11 16:41
链接:https://pan.baidu.com/s/1pCV4O-AuFBGuAslnoOo2Bw
提取码:iyts
复制这段内容后打开百度网盘手 ...

谢谢了大牛
页: [1]
查看完整版本: 安卓某软件逆向求教