You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried to instrument all the functions above binary. For couple of functions getting GUM_INSTRUMENTATION_ERROR_WRONG_SIGNATURE
Could you please let me know what's issue and when does it happen, let me know if you need more info to debug.
Does Frida has any restrictions on what kind of functions that can be instrumented ?
// Iterate through all functions in the module
module.enumerateExports().forEach(function (exp) {
// Attach a hook to each exported function
Interceptor.attach(exp.address, {
onEnter: function (args) {
console.log('Intercepted function:', exp.name || '');
console.log(' Arguments:');
for (let i = 0; i < Math.min(args.length, 4); i++) { // Print up to 4 arguments
console.log( arg${i}: ${args[i]});
}
},
onLeave: function (retval) {
console.log('Function returned:', retval.toInt32());
}
});
});
The text was updated successfully, but these errors were encountered:
I am trying to instrument following application https://github.com/ls1mardyn/ls1-mardyn.
Tried to instrument all the functions above binary. For couple of functions getting GUM_INSTRUMENTATION_ERROR_WRONG_SIGNATURE
Could you please let me know what's issue and when does it happen, let me know if you need more info to debug.
Does Frida has any restrictions on what kind of functions that can be instrumented ?
Details
Frida : latest git clone
Linux : satya@llvm-ssp312:~/.../src$ cat /etc/os-release
PRETTY_NAME="Ubuntu 23.04"
NAME="Ubuntu"
VERSION_ID="23.04"
VERSION="23.04 (Lunar Lobster)"
VERSION_CODENAME=lunar
Tried this script
const moduleName = '/home/user/app/ls1-mardyn/build/src/MarDyn'; // Replace with your binary's name
// Wait for the module to be loaded
Process.waitForEvent('module-loaded', { name: moduleName });
// Find the module
const module = Process.getModuleByName(moduleName);
const baseAddress = module.base;
// Iterate through all functions in the module
module.enumerateExports().forEach(function (exp) {
// Attach a hook to each exported function
Interceptor.attach(exp.address, {
onEnter: function (args) {
console.log('Intercepted function:', exp.name || '');
console.log(' Arguments:');
for (let i = 0; i < Math.min(args.length, 4); i++) { // Print up to 4 arguments
console.log(
arg${i}: ${args[i]}
);}
},
onLeave: function (retval) {
console.log('Function returned:', retval.toInt32());
}
});
});
The text was updated successfully, but these errors were encountered: