Created
April 19, 2015 11:19
-
-
Save SomeoneWeird/42f100cccd4e99f22536 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var frida = require('..'); | |
var processName = process.argv[2]; | |
var processAddress = process.argv[3]; | |
var script = | |
"var fn = new NativeFunction(ptr('%addr'), 'void', [ 'int' ]);" + | |
"fn(1);" + | |
"fn(1);" + | |
"fn(1);"; | |
frida.attach(processName).then(function(session) { | |
return session.createScript(script.replace('%addr%', processAddress)); | |
}).then(function(script) { | |
script.load().then(function() { | |
console.log("script loaded"); | |
}).catch(function(err) { | |
console.error(err); | |
}); | |
}).catch(function(err) { | |
console.error(err); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment