FIX: cathook can't be detached

This commit is contained in:
nullifiedcat 2017-03-24 14:58:47 +03:00
parent d386f50a18
commit d446b4704a

5
detach
View File

@ -25,13 +25,12 @@ if grep -q $(realpath bin/libcathook.so) /proc/${arr[$1]}/maps; then
-ex "attach ${arr[$1]}" \
-ex "set \$dlopen = (void*(*)(char*, int)) dlopen" \
-ex "set \$dlclose = (int(*)(void*)) dlclose" \
-ex "set \$library = \$dlopen(\"$(realpath libcathook.so)\", 6)" \
-ex "set \$library = \$dlopen(\"$(realpath bin/libcathook.so)\", 6)" \
-ex "print \$library" \
-ex "sharedlibrary ." \
-ex "call \$dlclose(\$library)" \
-ex "call \$dlclose(\$library)" \
-ex "continue" \
-ex "backtrace"
-ex "detach"
echo "Detached"
else
echo "not found!"