-
Notifications
You must be signed in to change notification settings - Fork 39
/
uload-stealth
executable file
·64 lines (52 loc) · 1.56 KB
/
uload-stealth
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
prefix="\e[34m\e[1mMcDota >\e[0m"
error_prefix="\e[91m\e[1mMcDota >\e[0m"
success_prefix="\e[32m\e[1mMcDota >\e[0m"
dota=$(pidof dota2)
if [ -z "$dota" ]; then
echo -e "$error_prefix Dota 2 is not open!"
exit -1
fi
if [ -e "/tmp/.mcdota" ]; then
last_library=$(cat /tmp/.mcdota)
else
echo -e "$error_prefix Could not find old filename. You'll have to restart Dota."
exit -1
fi
if ! grep -q "$last_library" /proc/$dota/maps; then
echo -e "$error_prefix McDota is not Injected..."
exit -1
fi
sudo killall -19 steam
sudo killall -19 steamwebhelper
#Send signal SIGXCPU, which will signal McDota to get ready for unloading.
kill -24 "$dota_pid"
input="$(
sudo gdb -n -q -batch \
-ex "set logging on" \
-ex "set logging file /dev/null" \
-ex "attach $dota" \
-ex "set \$dlopen = (void*(*)(char*, int)) dlopen" \
-ex "set \$dlclose = (int(*)(void*)) dlclose" \
-ex "set \$library = \$dlopen(\"$last_library\", 6)" \
-ex "call \$dlclose(\$library)" \
-ex "call \$dlclose(\$library)" \
-ex "call \$dlclose(\$library)" \
-ex "call \$dlerror()" \
-ex "detach" \
-ex "quit"
)"
last_line="${input##*$'\n'}"
echo ${last_line}
sleep 1
sudo killall -18 steamwebhelper
sudo killall -18 steam
if ! grep -q "$last_library" /proc/$dota/maps; then
echo -e "$success_prefix McDota has been successfully uninjected."
else
echo -e "$error_prefix McDota has failed to uninject and Dota 2 has gone rogue. Exterminating with extreme prejudice..."
./zombies
fi
if [ -f "$(pwd)/gdb.txt" ]; then
sudo rm -f gdb.txt
fi