突然想玩玩小時候的小游戲了(沒流量了)。看到個支付,就想破。。。
滑雪大冒險
mt管理器
首先就是打開mt管理器,提取這個游戲的安裝包。
還是沒殼的~
然后點一下安裝包,點 查看 。
隨便點一個dex
點第一個
點擊常量 。
點擊過濾
輸入 購買 , 點確定
因為我們要的是成功,所以這里點第一個
點擊搜索
然后點進去
因為沒會員,可以用np管理器打開到這里,然后再轉成java。
轉Java代碼如下
//
// Decompiled by Jadx (from NP Manager)
//
package com.yodo1.android.sdk.helper;import android.app.Activity;
import com.yodo1.android.sdk.constants.PayType;
import com.yodo1.android.sdk.utils.RegexUtils;
import com.yodo1.sdk.adapter.callback.ChannelSDKCallback;
import com.yodo1.sdk.adapter.entity.ChannelPayInfo;
import com.yodo1.sdk.adapter.entity.User;
import com.yodo1.sdk.adapter.function.PayAdapterBase;
import com.yodo1.sdk.kit.YLog;
import org.w3c.dom.Element;class Yodo1PayHelper$5 implements ChannelSDKCallback {
final /* synthetic */ Yodo1PayHelper this$0;
final /* synthetic */ Activity val$activity;
final /* synthetic */ ChannelPayInfo val$channelPayInfo;
final /* synthetic */ User val$channelUser;
final /* synthetic */ String val$extraParam;
final /* synthetic */ String val$orderId;
final /* synthetic */ PayAdapterBase val$payAdapter;
final /* synthetic */ Element val$payElement;
final /* synthetic */ PayType val$payType;
final /* synthetic */ ProductData val$productData;public void onResult(int i, int i2, String str) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(i2);
stringBuilder.append("");
Yodo1PayHelper.access$602(stringBuilder.toString());
stringBuilder = new StringBuilder();
stringBuilder.append(" pay channelpay callback, status = ");
stringBuilder.append(i);
stringBuilder.append(", errorCode = ");
stringBuilder.append(i2);
stringBuilder.append(", params = ");
stringBuilder.append(str);
String str2 = "Yodo1PayHelper";
YLog.d(str2, stringBuilder.toString());
if (RegexUtils.isJson(str)) {
this.val$productData.setExtras(str);
}
if (i != 1) {
String str3 = " 這是已購買的商品,購買成功";
if (i != 2) {
Yodo1PayHelper.access$200(this.this$0, this.val$activity);
Yodo1PayHelper.access$900(this.this$0, this.val$activity, this.val$productData.getOrderId());
if (208 == 301) {
this.this$0.startPay(this.val$activity, PayType.carriers, this.val$productData, this.val$extraParam);
return;
}
Yodo1PayHelper.access$700(this.this$0, this.val$productData, null, String.valueOf(208), str);
if (208 != null) {
if (208 != 103) {
if (208 != 104) {
if (208 == 208) {
YLog.d(str2, str3);
i2 = 1;
} else if (208 != 209) {
switch (208) {
case 203:
i2 = 203;
break;
case 204:
break;
case 205:
break;
default:
switch (208) {
case 302:
case 303:
case 304:
YLog.d("Yodo1PayHelper,支付更換支付方式errorCode");
i2 = 0;
break;
default:
i2 = 0;
break;
}
}
} else {
i2 = 3;
}
}
i2 = 207;
}
i2 = 205;
} else {
i2 = 0;
}
this.this$0.purchased(i2, this.val$channelPayInfo.getOrderId(), this.val$productData, this.val$payType);
return;
}
Yodo1PayHelper.access$200(this.this$0, this.val$activity);
Yodo1PayHelper.access$900(this.this$0, this.val$activity, this.val$productData.getOrderId());
if (208 == 208) {
YLog.d(str2, str3);
this.this$0.purchased(1, this.val$channelPayInfo.getOrderId(), this.val$productData, this.val$payType);
return;
}
this.this$0.purchased(2, this.val$channelPayInfo.getOrderId(), this.val$productData, this.val$payType);
Yodo1PayHelper.access$700(this.this$0, this.val$productData, null, String.valueOf(208), str);
return;
}
YLog.d(str2, " 正在查詢訂單狀態");
if (this.val$payAdapter.needQueryOrder(this.val$activity)) {
Yodo1PayHelper.access$1000(this.this$0, this.val$activity, this.val$productData, new 1(this));
} else if (this.val$payAdapter.needVerifyOrder(this.val$activity)) {
YLog.d(str2, " 訂單狀態校驗成功");
Yodo1PayHelper.access$200(this.this$0, this.val$activity);
this.this$0.purchased(1, this.val$orderId, this.val$productData, this.val$payType);
Yodo1PayHelper.access$900(this.this$0, this.val$activity, this.val$productData.getOrderId());
} else {
YLog.d(str2, " 正在提交訂單狀態");
Yodo1PayHelper.access$1100(this.this$0, this.val$productData, this.val$payType, new 2(this));
}
}Yodo1PayHelper$5(Yodo1PayHelper yodo1PayHelper, ProductData productData, PayAdapterBase payAdapterBase, Activity activity, ChannelPayInfo channelPayInfo, Element element, String str, User user, String str2, PayType payType) {
this.this$0 = yodo1PayHelper;
this.val$productData = productData;
this.val$payAdapter = payAdapterBase;
this.val$activity = activity;
this.val$channelPayInfo = channelPayInfo;
this.val$payElement = element;
this.val$extraParam = str;
this.val$channelUser = user;
this.val$orderId = str2;
this.val$payType = payType;
}
}
咱們來好好分析這篇代碼,這里面主要的判斷相關的代碼 就是 status 和 errorcode (重點來了。而我們需要代碼執行 購買成功 的那段 而判斷 就是 errorcode 是否等於208。
我們仔細看有中文附近的if判斷。
這個代碼有兩個判斷,先判斷status 來是否判斷前面這個 這個errorcode=208。但是 這段代碼過后 errorcode=1。我們再看后面的代碼。這個代碼將errorcode 傳入進去 (簡單點說就是用了errorcode這個的值)。也就說明 errorcode=1 被用后 就是購買成功的 意思。再看后面的代碼
如果前面的代碼沒有執行 那么 繼續判斷 errorcode 是不是等於208
那我們把errorcode的值修改成208看看(從理論上看修改成208 或者1 都行)
從代碼上看 判斷是否等於208 這個 永遠都會進行判斷是否等於208 而 1 的卻不清楚 status的狀態 也就告訴我們
不知道會不會運行前面那個判斷 而第二個判斷一定會運行。所以將errorcode 的值修改為208 那這不就行了?
那就切回到mt管理器。
通過查找發現
errorCode 就是p2來的。
我們給他賦值就行了。
我們在
然后退出來
然后點自動簽名。
接着就是安裝了
把原來安裝的卸載掉,在mt管理器里面下載
在游戲里面點購買,然后點
退出來,發現購買成功了!
在csdn手欠了一下,重新發布,然后就不給過審了。。。