summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2013-07-08 16:24:09 +0100
committernorly <ny-git@enpas.org>2015-02-24 00:18:27 +0100
commit8d09d791826fae7a13ccc710f54953af91dc5f7a (patch)
tree5bcc193f601a862ec014891a778800ef8bfc57b6
parent8df7b5caba6d0c8909fe9e637544be0b1555531c (diff)
README.md: Add example
-rw-r--r--README.md34
1 files changed, 27 insertions, 7 deletions
diff --git a/README.md b/README.md
index b3aa89c..6d6dde3 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,38 @@
centaur
=======
-centaur is an ELF executable editing toolkit.
+centaur is an ELF executable editing toolkit, focusing on code
+injection and function detouring.
-Features
---------
+Example
+-------
-At the moment, centaur provides:
- - Code injection from object files into executables
- - Function detouring in executables
+Injecting an object file into a program and detouring a function
+could hardly be simpler:
+
+ elfucli --input program \
+ --reladd objfile.o \
+ --detour oldfunc,newfunc \
+ --output program_modified
+
+elfucli parses the command line parameters one by one like a script.
+
+In this example, it:
+
+ 1. Loads the executable `program` containing the function `oldfunc`.
+ 2. Injects an object file containing the function `newfunc`.
+ 3. Overwrites the beginning of `oldfunc` with a jump to `newfunc`.
+ 4. Writes the modified program to `program_modified`.
+
+This functionality is exposed by the underlying `libelfu` via a C API,
+at the same high level. `elfucli` serves as an example application for
+it and doubles as a handy scalpel for ELF files.
+
+More examples can be found in the testsuite.
Build instructions, Credits, License, ...
-----------------------------------------
-See the docs/ directory for more documentation.
+See the docs/ directory for all other documentation.