Skip to content

Instantly share code, notes, and snippets.

@oleavr oleavr/hello.c Secret
Last active Apr 18, 2018

Embed
What would you like to do?
Frida Intro
#include <stdio.h>
#include <unistd.h>
void
f (int n)
{
printf ("Number: %d\n", n);
}
int
main ()
{
int i = 0;
printf ("f() is at %p\n", f);
while (1)
{
f (i++);
sleep (1);
}
}
'use strict';
const co = require('co');
const frida = require('frida');
let session, script;
co(function *() {
session = yield frida.attach('hello');
script = yield session.createScript('(' + agent.toString() + ').call(this);');
yield script.load();
});
function agent() {
'use strict';
Interceptor.attach(ptr('0x106a81ec0'), {
onEnter: function (args) {
args[0] = ptr("1337");
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.