Compare commits
5 Commits
cfefd337b9
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 13d89b020d | |||
| 34735c3e0e | |||
| 866701b499 | |||
| f47e9cb306 | |||
| 8c4cd61081 |
14
main.py
14
main.py
@@ -29,8 +29,8 @@ def main(package_name,script_path,is_spawn):
|
||||
print(f"script_path: {script_path}")
|
||||
js_code = modules.files_utils.read_javascript(script_path)
|
||||
# print(js_code)
|
||||
# modules.command.start_frida()
|
||||
modules.command.clearCache(package_name)
|
||||
modules.command.start_frida()
|
||||
# modules.command.clearCache(package_name)
|
||||
# 连接到USB设备
|
||||
device = frida.get_usb_device()
|
||||
print(device)
|
||||
@@ -67,12 +67,10 @@ if __name__ == '__main__':
|
||||
# 是否以spawn模式运行
|
||||
is_spawn = True
|
||||
# 目标进程名
|
||||
attach_process_name = "Navi"
|
||||
attach_process_name = "百度网盘"
|
||||
# 目标包名
|
||||
package_name = "com.shopee.br"
|
||||
package_name = "com.baidu.netdisk"
|
||||
# 注入的脚本路径
|
||||
# script_path = "./hook_conversions.js"
|
||||
# script_path = "./r0capture/script.js"
|
||||
# script_path = "url_request.js"
|
||||
script_path = "scripts/hookssl.js"
|
||||
# script_path = "scripts/hook_conversions.js"
|
||||
script_path = "scripts/baidunetdisk.js"
|
||||
main(package_name,script_path, is_spawn)
|
||||
|
||||
21
scripts/baidunetdisk.js
Normal file
21
scripts/baidunetdisk.js
Normal file
@@ -0,0 +1,21 @@
|
||||
console.log("Script loaded successfully");
|
||||
|
||||
Java.perform(function () {
|
||||
var Request = Java.use("okhttp3.Request");
|
||||
|
||||
// Hook Request的toString方法
|
||||
Request.toString.implementation = function () {
|
||||
// 调用原始的toString方法并保存结果
|
||||
var result = this.toString();
|
||||
|
||||
// 打印结果
|
||||
console.log("Request.toString result: " + result);
|
||||
|
||||
// 返回原始方法调用的结果
|
||||
return result;
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
console.log("Script loaded successfully");
|
||||
Java.perform(function() {
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user