Add injector script
This commit is contained in:
parent
ddbb36d191
commit
603baef039
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
pid=$(pidof "hl_linux")
|
||||||
|
libpath=$(realpath "libhlcheat.so")
|
||||||
|
|
||||||
|
# 0x2 -> RTLD_NOW
|
||||||
|
sudo gdb -n -q -batch \
|
||||||
|
-ex "attach $pid" \
|
||||||
|
-ex "set \$dlopen = (void* (*)(char*, int))dlopen" \
|
||||||
|
-ex "set \$dlerror = (char* (*)(void))dlerror" \
|
||||||
|
-ex "call \$dlopen(\"$libpath\", 2)" \
|
||||||
|
-ex "call \$dlerror()" \
|
||||||
|
-ex "detach" \
|
||||||
|
-ex "quit"
|
||||||
|
|
||||||
|
# -ex "set \$dlclose = (int (*)(void*))dlclose" \
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo -e "\nhl-cheat loaded!"
|
||||||
|
fi
|
Loading…
Reference in New Issue