突然想玩玩小时候的小游戏了(没流量了)。看到个支付,就想测试测试

 滑雪大冒险

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管理器里面下载

 在游戏里面点购买,然后点

 退出来,发现购买成功了!

测试完成!!!

技术
下载桌面版
GitHub
Microsoft Store
SourceForge
夸克网盘
百度网盘
云服务器优惠
华为云优惠券
京东云优惠券
腾讯云优惠券
阿里云优惠券
Vultr优惠券
站点信息
问题反馈
邮箱:[email protected]
吐槽一下
QQ群:766591547
关注微信