吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 767|回复: 4
收起左侧

[求助] frida hook 安卓app 报错请求帮忙

[复制链接]
两只小蜜蜂 发表于 2023-9-12 21:34
本帖最后由 两只小蜜蜂 于 2023-9-12 21:36 编辑

小白一枚,需要逆向一个app接口的加密参数,在使用frIDA时报了这个错,因为我这个方法名就叫a,即便用jadx反混淆之后,依旧是一串字母和数字的组合,所以我想是不是因为app混淆了方法名,所以才报这个错的,那么如果是这个原因要怎么解决呢,求大佬指路
报错如下:
[JavaScript] 纯文本查看 复制代码
{'type': 'error', 'description': "TypeError: cannot set property 'implementation' of undefined", 'stack': "TypeError: cannot set property 'implementation' of undefined\n    at <anonymous> (/script1.js:5)\n    at <anonymous> (frida/node_modules/frida-java-bridge/lib/vm.js:12)\n    at _performPendingVmOps (frida/node_modules/frida-java-bridge/index.js:250)\n    at <anonymous> (frida/node_modules/frida-java-bridge/index.js:225)\n    at <anonymous> (frida/node_modules/frida-java-bridge/lib/vm.js:12)\n    at _performPendingVmOpsWhenReady (frida/node_modules/frida-java-bridge/index.js:244)\n    at perform (frida/node_modules/frida-java-bridge/index.js:204)\n    at <eval> (/script1.js:6)", 'fileName': '/script1.js', 'lineNumber': 5, 'columnNumber': 1}

python代码如下:
[Python] 纯文本查看 复制代码
import frida
import pprint
import sys
mw_shl_code=python,true]def on_message(message,data):
    print(message)

session = frida.get_remote_device().attach('网易BUFF')
with open("./frida.js") as f:
    script = session.create_script(f.read())

script.on('message',on_message)
script.load()

sys.stdin.read()

js代码如下:
[JavaScript] 纯文本查看 复制代码
Java.perform(function (){
    Java.use('com.netease.buff.core.network.ApiCrypt').a.getSmscode.implementation = function(s){
        console.log(s)
        return this.a(s);
    }
});

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

laos 发表于 2023-9-12 21:41
你a的屁股后面还跟着getSmscode?
 楼主| 两只小蜜蜂 发表于 2023-9-12 21:43
laos 发表于 2023-9-12 21:41
你a的屁股后面还跟着getSmscode?

看b站视频上是这么写的,请大佬赐教,要怎么写才对
 楼主| 两只小蜜蜂 发表于 2023-9-12 21:48
laos 发表于 2023-9-12 21:41
你a的屁股后面还跟着getSmscode?

真是这个方法的问题,我删了这个方法,就hook到了 ,谢谢大佬
小雨网络 发表于 2023-9-13 10:58
import frida
import sys

def on_message(message, data):
    print(message)

# 要附加到的应用程序的名称
app_name = '网易BUFF'

# 读取Frida脚本文件
with open('./frida.js') as f:
    script_code = f.read()

# 附加到目标应用程序
session = frida.get_remote_device().attach(app_name)

# 创建并加载Frida脚本
script = session.create_script(script_code)
script.on('message', on_message)
script.load()

# 保持脚本运行
sys.stdin.read()
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止回复与主题无关非技术内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-4-29 12:17

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表