From fae448909386017ef7ee228b3e0925dac4d8587e Mon Sep 17 00:00:00 2001 From: Arti Karahoda Date: Sat, 12 Jan 2019 04:10:12 +0100 Subject: [PATCH] Update README.md Binaries will use the correct shared object (`libprocesshider.so`) architecture (32-bit or 64-bit) using the expansion of the `$LIB` variable from `/etc/ld.so.preload` --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a31abae..be26445 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,17 @@ In short, compile the library: ``` gianluca@sid:~/libprocesshider$ make gcc -Wall -fPIC -shared -o libprocesshider.so processhider.c -ldl -gianluca@sid:~/libprocesshider$ sudo mv libprocesshider.so /usr/local/lib/ +gianluca@sid:~/libprocesshider$ mkdir {32,64} +gianluca@sid:~/libprocesshider$ gcc -Wall -m32 -fPIC -shared -o 32/libprocesshider.so processhider.c -ldl +gianluca@sid:~/libprocesshider$ gcc -Wall -fPIC -shared -o 64/libprocesshider.so processhider.c -ldl +gianluca@sid:~/libprocesshider$ sudo mv 32/libprocesshider.so /usr/lib32/libprocesshider.so +gianluca@sid:~/libprocesshider$ sudo mv 64/libprocesshider.so /usr/lib/x86_64-linux-gnu/libprocesshider.so ``` Load it with the global dynamic linker ``` -root@sid:~# echo /usr/local/lib/libprocesshider.so >> /etc/ld.so.preload +root@sid:~# echo '/usr/$LIB/libprocesshider.so' > /etc/ld.so.preload ``` And your process will be off the radar