本帖最后由 默小坑 于 2015-1-20 23:42 编辑
只是写给跟我一样的小白看的
欢迎大神吐槽。。
游戏:3D终极车神
支付插件:百度移动游戏(集成各大运营商的支付sdk 还有支付宝啥的)
关键方法名:onResponse
本游戏关键字: GamePropsActivity测试机型: 华为荣耀 H60-L12
使用运营商支付时必须去掉短信权限或者lbe拦截(本游戏lbe拦截直接失败)。。直接点购买
修改项:支付宝返回成功
首先运行看看提示
打开ps:俺手机是联通版。只保证联通手机(卡)可用
其它运营商的飞行模式自测
直接短信拦截后提示
提示 购买失败
然后呢打开mt管理器 搜索购买失败
等。。。。
哟西、、、只出来一个(找不到时可以搜开始时说的关键字)
点开这个。。
正文开始
const-string v0 "GamePropsActivity"
invoke-static {v0,v6} Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
label_5:
new-instance v0 Lorg/json/JSONObject;
invoke-direct {v0,v6} Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
const-string v1 "function_status_code"
invoke-virtual {v0,v1} Lorg/json/JSONObject;->getInt(Ljava/lang/String;)I
move-result v1
const/16 v2 0xbc7
if-ne v1 v2 :label_45
#这个改成goto :label_45这里是支付宝×件返回数据检测的
iget-object v2 v5 Lro;->a:Lcn/eden/BaseActivity;
const-string v3 "用户透传数据不合法"
const/4 v4 0
invoke-static {v2,v3,v4} Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v2
invoke-virtual {v2} Landroid/widget/Toast;->show()V
invoke-static {} Lol;->a()Lol;
move-result-object v2
iget-object v3 v5 Lro;->a:Lcn/eden/BaseActivity;
iget v3 v3 Lcn/eden/BaseActivity;->a:I
const/high16 v4 0x4000
invoke-virtual {v2,v3,v4} Lol;->a(IF)V
label_45:
const/16 v2 0xbc6
if-ne v1 v2 :label_63
invoke-static {} Lol;->a()Lol;
move-result-object v0
iget-object v1 v5 Lro;->a:Lcn/eden/BaseActivity;
iget v1 v1 Lcn/eden/BaseActivity;->a:I
const/high16 v2 0x4000
invoke-virtual {v0,v1,v2} Lol;->a(IF)V
label_62:
return-void
label_63:
。。。。。。。。。。。。。。此处省略。。。。
move-result v2
if-eqz v2 :label_128
#这里的跳转改goto
const-string v2 "bd_order_pay_channel"
invoke-virtual {v0,v2} Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
label_128:#记住这个,一会有用
const/16 v0 0xbc2
if-ne v1 v0 :label_163#删掉这行
invoke-static {} Lol;->a()Lol;
move-result-object v0
iget-object v1 v5 Lro;->a:Lcn/eden/BaseActivity;
iget v1 v1 Lcn/eden/BaseActivity;->a:I
const/high16 v2 0x3f80
invoke-virtual {v0,v1,v2} Lol;->a(IF)V
iget-object v0 v5 Lro;->a:Lcn/eden/BaseActivity;
const-string v1 "购买成功!"
const/4 v2 0
invoke-static {v0,v1,v2} Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v0
invoke-virtual {v0} Landroid/widget/Toast;->show()V
label_157:
goto :label_62
label_158:
move-exception v0
invoke-virtual {v0} Ljava/lang/Exception;->printStackTrace()V
goto :label_62
label_163:
const/16 v0 0xbc3
if-ne v1 v0 :label_162
#把这个改成 if-ne v1 v0 :label_128
#或者改成goto :label_128
label_167:
invoke-static {} Lol;->a()Lol;
move-result-object v0
iget-object v1 v5 Lro;->a:Lcn/eden/BaseActivity;
iget v1 v1 Lcn/eden/BaseActivity;->a:I
const/high16 v2 0x4000
invoke-virtual {v0,v1,v2} Lol;->a(IF)V
iget-object v0 v5 Lro;->a:Lcn/eden/BaseActivity;
const-string v1 "购买失败"
const/4 v2 0
invoke-static {v0,v1,v2} Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v0
invoke-virtual {v0} Landroid/widget/Toast;->show()V
goto/16 :label_62
label_194:
const/16 v0 0xbc5
if-ne v1 v0 :label_225
#↑把这个也改成 if-ne v1 v0 :label_128
#或者改成goto :label_128
invoke-static {} Lol;->a()Lol;
move-result-object v0
iget-object v1 v5 Lro;->a:Lcn/eden/BaseActivity;
iget v1 v1 Lcn/eden/BaseActivity;->a:I
const/high16 v2 0x4000
invoke-virtual {v0,v1,v2} Lol;->a(IF)V
iget-object v0 v5 Lro;->a:Lcn/eden/BaseActivity;
const-string v1 "购买出现异常"
const/4 v2 0
invoke-static {v0,v1,v2} Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v0
invoke-virtual {v0} Landroid/widget/Toast;->show()V
goto/16 :label_62
label_225:
const/16 v0 0xbc4
if-ne v1 v0 :label_128
#这里也改成 if-ne v1 v0 :label_128
#或者改成goto :label_128
invoke-static {} Lol;->a()Lol;
move-result-object v0
iget-object v1 v5 Lro;->a:Lcn/eden/BaseActivity;
iget v1 v1 Lcn/eden/BaseActivity;->a:I
const/high16 v2 0x4000
invoke-virtual {v0,v1,v2} Lol;->a(IF)V
iget-object v0 v5 Lro;->a:Lcn/eden/BaseActivity;
const-string v1 "取消支付"
const/4 v2 0
invoke-static {v0,v1,v2} Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v0
invoke-virtual {v0} Landroid/widget/Toast;->show()V
goto/16 :label_62
label_256:
invoke-static {} Lol;->a()Lol;
move-result-object v0
iget-object v1 v5 Lro;->a:Lcn/eden/BaseActivity;
iget v1 v1 Lcn/eden/BaseActivity;->a:I
const/high16 v2 0x4000
invoke-virtual {v0,v1,v2} Lol;->a(IF)V
iget-object v0 v5 Lro;->a:Lcn/eden/BaseActivity;
const-string v1 "未知情况"
const/4 v2 0
invoke-static {v0,v1,v2} Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v0
invoke-virtual {v0} Landroid/widget/Toast;->show()V
label_281:
goto/16 :label_62
。。。。。。。。
保存dex。签名安装测试看看,
在支付宝界面出来后点取消付款ok
删除短信权限后点支付直接成功
就这样,百度移动游戏就fuck了
好吧,写的有点乱。。。文采不行。。
原文件和fuck后的文件有兴趣的就看看吧
链接:http://pan.baidu.com/s/1o6uoaka 密码:dz3k
|