콘텐츠로 건너뛰기

[CodeEngn] MobileApp L03

문제 정보

키값을 찾으시오

문제 파일

SmartApp L03.apk

패치

public class MainActivity extends Activity {
    TextView aView;
    TextView bView;
    ImageButton button;
    TextView cView;

    ...

    public void addListenerOnButton() {
        this.button = (ImageButton) findViewById(R.id.imageButton1);
        this.aView = (TextView) findViewById(R.id.textView4);
        this.bView = (TextView) findViewById(R.id.textView5);
        this.cView = (TextView) findViewById(R.id.textView6);
        this.aView.setText(String.format("%d", Integer.valueOf(randomRange(44444))));
        this.bView.setText("0");
        this.cView.setText(myString());
        this.button.setOnClickListener(new View.OnClickListener() { // from class: com.namdaehyeon.findkey3.MainActivity.1
            Integer myStairs;
            Integer stairs;

            {
                this.stairs = Integer.valueOf(Integer.parseInt(new StringBuilder().append((Object) MainActivity.this.aView.getText()).toString()));
                this.myStairs = Integer.valueOf(Integer.parseInt(new StringBuilder().append((Object) MainActivity.this.bView.getText()).toString()));
            }

            @Override // android.view.View.OnClickListener
            public void onClick(View arg0) {
                if (this.stairs.intValue() - 1 != this.myStairs.intValue()) {
                    this.myStairs = Integer.valueOf(this.myStairs.intValue() + 1);
                    MainActivity.this.bView.setText(this.myStairs.toString());
                    return;
                }
                MainActivity.this.aView.setText(Security.DecryptStr("2736f6055dbad2d42f6d5b0135395cb29e0d086b67e1fa266a0a0d277f151e5b00000000000000000000"));
                MainActivity.this.bView.setText("0");
            }
        });
    }
}

MainActivity.this.aView.setText(Security.DecryptStr(“2736f6055dbad2d42f6d5b0135395cb29e0d086b67e1fa266a0a0d277f151e5b00000000000000000000”));

.method public onClick(Landroid/view/View;)V
    .registers 4
    .param p1, "arg0"    # Landroid/view/View;

    .prologue
    .line 71
    iget-object v0, p0, Lcom/namdaehyeon/findkey3/MainActivity$1;->stairs:Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    iget-object v1, p0, Lcom/namdaehyeon/findkey3/MainActivity$1;->myStairs:Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    if-eq v0, v1, :cond_2c
...

if-eq v0, v1, :cond_2c 코드를

goto :cond_2c로 패치

:cond_2c
    iget-object v0, p0, Lcom/namdaehyeon/findkey3/MainActivity$1;->this$0:Lcom/namdaehyeon/findkey3/MainActivity;

    iget-object v0, v0, Lcom/namdaehyeon/findkey3/MainActivity;->aView:Landroid/widget/TextView;

    const-string v1, "2736f6055dbad2d42f6d5b0135395cb29e0d086b67e1fa266a0a0d277f151e5b00000000000000000000"

    invoke-static {v1}, Lcom/namdaehyeon/findkey3/Security;->DecryptStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 78
    :goto_2b
    return-void

    .line 75
    :cond_2c
    iget-object v0, p0, Lcom/namdaehyeon/findkey3/MainActivity$1;->this$0:Lcom/namdaehyeon/findkey3/MainActivity;

    iget-object v0, v0, Lcom/namdaehyeon/findkey3/MainActivity;->aView:Landroid/widget/TextView;

    const-string v1, "2736f6055dbad2d42f6d5b0135395cb29e0d086b67e1fa266a0a0d277f151e5b00000000000000000000"

    invoke-static {v1}, Lcom/namdaehyeon/findkey3/Security;->DecryptStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 76
    iget-object v0, p0, Lcom/namdaehyeon/findkey3/MainActivity$1;->this$0:Lcom/namdaehyeon/findkey3/MainActivity;

    iget-object v0, v0, Lcom/namdaehyeon/findkey3/MainActivity;->bView:Landroid/widget/TextView;

    const-string v1, "0"

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
...

aView <-> bView 서로 바꾸기

디컴파일

apktool d “.\SmartApp L03.apk”

빌드

apktool b “.\SmartApp L03” -o SmartApp_L03_patched.apk

재서명

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore h4ck.kr.keystore SmartApp_L03_patched.apk h4ck.kr

KEY

CodeEngn_4_Ever

답글 남기기