forked from AimTuxOfficial/AimTux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
load
executable file
·34 lines (28 loc) · 1022 Bytes
/
load
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
csgo_pid=$(pidof csgo_linux64)
if [ -z "$csgo_pid" ]; then
/bin/echo -e "\e[31mCSGO needs to be open before you can inject...\e[0m"
exit 1
fi
if [ ! -d ".git" ]; then
/bin/echo "We have detected that you have downloaded aimtux-master.zip from the GitHub website. This is the WRONG way to download AimTux. Please download AimTux with the command 'git clone --recursive https://github.com/AimTuxOfficial/AimTux'"
fi
#Credit: Aixxe @ aixxe.net
if grep -q libAimTux.so /proc/$csgo_pid/maps; then
/bin/echo -e "\e[33mAimTux is already injected... Aborting...\e[0m"
exit
fi
input="$(
sudo gdb -n -q -batch \
-ex "attach $csgo_pid" \
-ex "set \$dlopen = (void*(*)(char*, int)) dlopen" \
-ex "call \$dlopen(\"$(pwd)/libAimTux.so\", 1)" \
-ex "detach" \
-ex "quit"
)"
last_line="${input##*$'\n'}"
if [ "$last_line" != "\$1 = (void *) 0x0" ]; then
/bin/echo -e "\e[32mSuccessfully injected!\e[0m"
else
/bin/echo -e "\e[31mInjection failed, make sure you've compiled...\e[0m"
fi