Frida踩坑 can‘t decode byte 0xc0 in position 86 , can‘t decode byte 0xc0 in position 86

欢迎关注微信公众号:小生听雨园 ,获取最新消息,欢迎您的到来。

完整错误

今天调试app的时候出现一个错误
{'type': 'error', 'description': "Error: can't decode byte 0xc0 in position 86", 'stack': "Error: can't decode byte 0xc0 in position 86\n at frida/runtime/core.js:144\n at frida/node_modules/frida-java-bridge/lib/env.js:607\n at frida/node_modules/frida-java-bridge/lib/class-factory.js:1239\n at input:1\n at input:1", 'fileName': 'frida/runtime/core.js', 'lineNumber': 144, 'columnNumber': 1}

乍一看是编码解码错误,我以为是我firda中js代码写错了,但检查一遍又一遍,不是!!!

python代码

python代码

javascript代码

Java.perform(function(){
    // hookClass("com.xxxxxxxx")
    hookClassLoader("com.xxxxxxxxx")
})

经过一下午的调试,找问题,终于定位到问题

之前也是这么用,没出问题,这是头一次出问题

正确调用代码

import frida, sys

with open ("response_enc_hook.js", "r", encoding="utf-8")as fp:
    jscode = fp.read()


process = frida.get_usb_device(-1).attach('com.xxxxxx')

script = process.create_script(jscode)
print('[*] Running ---')
script.load()
sys.stdin.read()

或者像Frida官网介绍的方式
或者像Frida官网介绍的方式

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值