Compare commits

..

18 Commits

Author SHA1 Message Date
13d89b020d 更新 hookssl.js 2024-03-07 00:24:13 +08:00
34735c3e0e 创建 baidunetdisk.js 2024-03-07 00:24:09 +08:00
866701b499 更新 main.py 2024-03-07 00:24:06 +08:00
f47e9cb306 更新 main.py 2023-11-09 17:08:12 +08:00
8c4cd61081 更新 main.py 2023-11-07 14:18:03 +08:00
cfefd337b9 删除 url_request.js 2023-11-06 17:02:31 +08:00
af1a9e1859 更新 test.py 2023-11-06 17:02:29 +08:00
6c7278a064 删除 test.js 2023-11-06 17:02:27 +08:00
58c81f32e5 创建 url_request.js 2023-11-06 17:02:24 +08:00
67623951ce 创建 test.js 2023-11-06 17:02:22 +08:00
8960406388 创建 monitor_request.js 2023-11-06 17:02:18 +08:00
51bf1e5a6f 创建 hookssl.js 2023-11-06 17:02:16 +08:00
0e75201906 创建 hook_qqmusic.js 2023-11-06 17:02:14 +08:00
8aa5351ccc 创建 hook_conversions.js 2023-11-06 17:02:12 +08:00
1e80a8067b 删除 hookssl.js 2023-11-06 17:02:09 +08:00
df7b021ea0 删除 hook_qqmusic.js 2023-11-06 17:02:07 +08:00
86f1a339d0 删除 hook_conversions.js 2023-11-06 17:02:04 +08:00
b8e653e57d 更新 main.py 2023-11-06 17:01:58 +08:00
9 changed files with 59 additions and 12 deletions

10
main.py
View File

@@ -67,12 +67,10 @@ if __name__ == '__main__':
# 是否以spawn模式运行
is_spawn = True
# 目标进程名
attach_process_name = "Navi"
attach_process_name = "百度网盘"
# 目标包名
package_name = "com.tencent.qqmusic"
package_name = "com.baidu.netdisk"
# 注入的脚本路径
# script_path = "./hook_conversions.js"
# script_path = "./r0capture/script.js"
# script_path = "url_request.js"
script_path = "hook_qqmusic.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
View 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;
};
});

View File

@@ -1,3 +1,4 @@
console.log("Script loaded successfully");
Java.perform(function() {
/*
@@ -67,11 +68,6 @@ hook list:
} catch (e) {
quiet_send("registerClass from X509TrustManager >>>>>>>> " + e.message);
}
// Prepare the TrustManagers array to pass to SSLContext.init()
var TrustManagers = [TrustManager.$new()];

View File

@@ -0,0 +1,32 @@
log_info("Script loaded successfully");
Java.perform(function () {
var OkHttpClient = Java.use('okhttp3.OkHttpClient');
var Request = Java.use('okhttp3.Request');
OkHttpClient.newCall.implementation = function (request) {
var url = request.url().toString();
var method = request.method();
var body = request.body();
var size = body != null ? body.contentLength() / 1024 : 0;
console.log("Method: " + method + "\nURL: " + url + "\nSize: " + size + " kb");
return this.newCall(request);
};
});
function log_info(messages) {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0'); // Months are 0-based
const day = String(now.getDate()).padStart(2, '0');
const hours = String(now.getHours()).padStart(2, '0');
const minutes = String(now.getMinutes()).padStart(2, '0');
const seconds = String(now.getSeconds()).padStart(2, '0');
const milliseconds = String(now.getMilliseconds()).padStart(3, '0');
const timestamp = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}:${milliseconds}`;
console.log(`${timestamp} - ${messages}`);
send(`${timestamp} - ${messages}`);
}

View File

@@ -1,7 +1,7 @@
import frida,sys
import modules.files_utils
js_code = modules.files_utils.read_javascript("./hook_conversions.js")
js_code = modules.files_utils.read_javascript("scripts/hook_conversions.js")
device = frida.get_usb_device()
pid = device.spawn(["com.naviapp"]) # 以挂起方式创建进程
process = device.attach(pid)