Compare commits
No commits in common. "cfefd337b95a9057663badcd55136f4865436097" and "9ec56ced34be3e88214fc7ab36662d3800187cc1" have entirely different histories.
cfefd337b9
...
9ec56ced34
|
|
@ -67,6 +67,11 @@ hook list:
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
quiet_send("registerClass from X509TrustManager >>>>>>>> " + e.message);
|
quiet_send("registerClass from X509TrustManager >>>>>>>> " + e.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Prepare the TrustManagers array to pass to SSLContext.init()
|
// Prepare the TrustManagers array to pass to SSLContext.init()
|
||||||
var TrustManagers = [TrustManager.$new()];
|
var TrustManagers = [TrustManager.$new()];
|
||||||
|
|
||||||
8
main.py
8
main.py
|
|
@ -29,8 +29,8 @@ def main(package_name,script_path,is_spawn):
|
||||||
print(f"script_path: {script_path}")
|
print(f"script_path: {script_path}")
|
||||||
js_code = modules.files_utils.read_javascript(script_path)
|
js_code = modules.files_utils.read_javascript(script_path)
|
||||||
# print(js_code)
|
# print(js_code)
|
||||||
# modules.command.start_frida()
|
modules.command.start_frida()
|
||||||
modules.command.clearCache(package_name)
|
# modules.command.clearCache(package_name)
|
||||||
# 连接到USB设备
|
# 连接到USB设备
|
||||||
device = frida.get_usb_device()
|
device = frida.get_usb_device()
|
||||||
print(device)
|
print(device)
|
||||||
|
|
@ -69,10 +69,10 @@ if __name__ == '__main__':
|
||||||
# 目标进程名
|
# 目标进程名
|
||||||
attach_process_name = "Navi"
|
attach_process_name = "Navi"
|
||||||
# 目标包名
|
# 目标包名
|
||||||
package_name = "com.shopee.br"
|
package_name = "com.tencent.qqmusic"
|
||||||
# 注入的脚本路径
|
# 注入的脚本路径
|
||||||
# script_path = "./hook_conversions.js"
|
# script_path = "./hook_conversions.js"
|
||||||
# script_path = "./r0capture/script.js"
|
# script_path = "./r0capture/script.js"
|
||||||
# script_path = "url_request.js"
|
# script_path = "url_request.js"
|
||||||
script_path = "scripts/hookssl.js"
|
script_path = "hook_qqmusic.js"
|
||||||
main(package_name,script_path, is_spawn)
|
main(package_name,script_path, is_spawn)
|
||||||
|
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
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}`);
|
|
||||||
}
|
|
||||||
2
test.py
2
test.py
|
|
@ -1,7 +1,7 @@
|
||||||
import frida,sys
|
import frida,sys
|
||||||
import modules.files_utils
|
import modules.files_utils
|
||||||
|
|
||||||
js_code = modules.files_utils.read_javascript("scripts/hook_conversions.js")
|
js_code = modules.files_utils.read_javascript("./hook_conversions.js")
|
||||||
device = frida.get_usb_device()
|
device = frida.get_usb_device()
|
||||||
pid = device.spawn(["com.naviapp"]) # 以挂起方式创建进程
|
pid = device.spawn(["com.naviapp"]) # 以挂起方式创建进程
|
||||||
process = device.attach(pid)
|
process = device.attach(pid)
|
||||||
|
|
|
||||||
Reference in New Issue