Skip to content
Snippets Groups Projects
Commit c2c4e950 authored by whh8b's avatar whh8b
Browse files

Add simple hello callback.

parent f326b4ff
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,8 @@ datashadow/datashadow_callbacks.c -text ...@@ -24,6 +24,8 @@ datashadow/datashadow_callbacks.c -text
datashadow/test_datashadow.cpp -text datashadow/test_datashadow.cpp -text
example/Makefile.in -text example/Makefile.in -text
example/callback.c -text example/callback.c -text
hello/Makefile.in -text
hello/hello.c -text
hookdynamic/Makefile.in -text hookdynamic/Makefile.in -text
hookdynamic/hook_dynamic_callbacks.c -text hookdynamic/hook_dynamic_callbacks.c -text
inferfn/Makefile.in -text inferfn/Makefile.in -text
......
...@@ -73,6 +73,7 @@ enable_dir rss ...@@ -73,6 +73,7 @@ enable_dir rss
enable_dir hookdynamic enable_dir hookdynamic
enable_dir canaries enable_dir canaries
enable_dir mixr enable_dir mixr
enable_dir hello
enable_dir cookbook enable_dir cookbook
enable_dir buffrecv enable_dir buffrecv
enable_dir datashadow enable_dir datashadow
......
CC=@CC@
EXTRA_INCLUDES=
CFLAGS=-fno-omit-frame-pointer @CFLAGS@ -O0 $(EXTRA_INCLUDES)
LIB=@LIB@
AR=@AR@
AS=@AS@
ASFLAGS=@ASFLAGS@
OBJS=hello.o
SRCS=hello.c
.SUFFIXES: .o .s .c
.c.o:
$(CC) $(CFLAGS) $(INCLUDE) -D__$(ARCH) -c $<
.s.o:
$(AS) $(ASFLAGS) $<
all: $(OBJS)
$(AR) -r $(LIB) $(OBJS)
clean:
rm *.o
int syscall(int number, ...);
#include <stdlib.h>
#include <malloc.h>
#include <stdint.h>
#include <strlen.h>
#include <itox.h>
void print_str(char *s)
{
write(1,s,strlen(s));
}
void zipr_hook_start(unsigned int id, unsigned long long rax, unsigned long long rsp)
{
print_str("Hello!\n");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment