mirror of
https://github.com/QM4RS/FridaBox.git
synced 2026-09-26 02:52:29 +02:00
Integrate Frida Gadget into BlackBox guest startup, add the host workflow and controller tooling, and validate the complete sample hook flow on ARM64 Android 16.
27 lines
897 B
JavaScript
27 lines
897 B
JavaScript
'use strict';
|
|
|
|
const seen = new Set();
|
|
|
|
function report(module) {
|
|
if (seen.has(module.path)) return;
|
|
seen.add(module.path);
|
|
console.log('[native-load] ' + module.name + ' base=' + module.base + ' path=' + module.path);
|
|
if (typeof globalThis.onGuestModuleLoaded === 'function') {
|
|
try { globalThis.onGuestModuleLoaded(module); } catch (error) { console.error(error.stack || error); }
|
|
}
|
|
}
|
|
|
|
Process.enumerateModules().forEach(report);
|
|
Process.attachModuleObserver({ onAdded: report, onRemoved() {} });
|
|
|
|
['dlopen', 'android_dlopen_ext'].forEach(name => {
|
|
const address = Module.findGlobalExportByName(name);
|
|
if (address === null) return;
|
|
Interceptor.attach(address, {
|
|
onEnter(args) { this.path = args[0].isNull() ? null : args[0].readCString(); },
|
|
onLeave(result) {
|
|
if (this.path !== null) console.log('[' + name + '] ' + this.path + ' => ' + result);
|
|
}
|
|
});
|
|
});
|