A simple lib to help read and write in the memory of a linux process
make [target] [options]
Target list:
target | description |
---|---|
default (no target defined) | Build libignotum.so and libignotum.a |
all | Build libignotum.so and libignotum.a |
test | Build some tests |
doc | gziped man pages in doc dir |
install | Install libignotum.so, libignotum.a and ignotum.h |
doc-install | Install files generated by "doc" target |
uninstall | Remove files installed by "install" target |
clean | remove files generated by "default/all" target |
clean-test | remove files generated by "test" target |
clean-doc | remove files generated by "doc" target |
clean-all | remove all files generated by any target |
Options list:
option | description |
---|---|
PREFIX | set prefix to install/uninstall files (default: /usr) |
CFLAGS | set compiler flags |
LDFLAGS | set linker flags |
Compiling and install
$ make all
$ sudo make install PREFIX=/mypath
Linking
$ gcc mysource.c -lignotum -o dynamic-linked
$ gcc mysource.c -l:libignotum.a -o static-linked
Remove
$ sudo make uninstall PREFIX=/mypath
ssize_t ignotum_getmaplist(ignotum_maplist_t *list, pid_t pid);
int ignotum_getmapbyaddr(ignotum_mapinfo_t *out, pid_t pid, off_t addr);
int ignotum_getbasemap(ignotum_mapinfo_t *out, pid_t pid, const char *filename, int wildcard);
ssize_t ignotum_mem_write(pid_t pid, const void *buf, size_t n, off_t addr);
ssize_t ignotum_mem_read(pid_t pid, void *buf, size_t n, off_t addr);
ssize_t ignotum_ptrace_write(pid_t pid, const void *buf, size_t n, long addr);
ssize_t ignotum_ptrace_read(pid_t pid, void *buf, size_t n, long addr);
void ignotum_search_init(ignotum_search_t *cs, const void *search, size_t len);
int ignotum_search_loop(ignotum_search_t *cs, off_t *out, off_t vaddr, const void *mem, size_t len);
void free_ignotum_maplist(ignotum_maplist_t *);
see the man files at doc/