Skip to content

Instantly share code, notes, and snippets.

@Manouchehri
Forked from oleavr/example.js
Created June 9, 2016 23:19
Interceptor context example
'use strict';
Module.enumerateExports('libssl.so', {
onMatch(e) {
if (e.type === 'function')
Interceptor.attach(e.address, createHook(e.name, e.address));
},
onComplete() {
}
});
function createHook(name, address) {
return {
onEnter(args) {
// You can access `name` and `address` here
},
onLeave(retval) {
// and here
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment