반응형
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
#include <stdio.h> | |
#include <unistd.h> | |
void | |
f (int n) | |
{ | |
printf ("Number: %d\n", n); | |
} | |
int | |
main (int argc, | |
char * argv[]) | |
{ | |
int i = 0; | |
printf ("f() is at %p\n", f); | |
while (1) | |
{ | |
f (i++); | |
sleep (1); | |
} | |
} |
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
from __future__ import print_function | |
import frida | |
import sys | |
session = frida.attach("hello") | |
script = session.create_script(""" | |
Interceptor.attach(ptr("%s"), { | |
onEnter: function(args) { | |
send(args[0].toInt32()); | |
} | |
}); | |
""" % int(sys.argv[1], 16)) | |
def on_message(message, data): | |
print(message) | |
script.on('message', on_message) | |
script.load() | |
sys.stdin.read() |
반응형
'debug > 0x01-frida' 카테고리의 다른 글
frida hello world 출력하기 ][ class name과 bluetooth 관련 class name 출력하기 (0) | 2020.05.15 |
---|---|
frida code review ][ 클래스 이름 가져오기 (0) | 2020.05.15 |