完整错误

今天调试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官网介绍的方式

分类: app逆向

站点统计

  • 文章总数:309 篇
  • 分类总数:19 个
  • 标签总数:191 个
  • 运行天数:1009 天
  • 访问总数:128974 人次

浙公网安备33011302000604

辽ICP备20003309号