This repository has been archived on 2024-06-13. You can view files and clone it, but cannot push or open issues or pull requests.
doghook/attach-basic-interactive.sh
F1ssi0N 7ce00987a0 Crossplatform support for the whole of backtrack + some more goodies (#33)
* Fix code style and add crossplat support for some functions

* Fix bug from code style changes

* Add profiler

* add debug define

* Update convar to_string functions to work and init the tf_convar correctly

* Add font drawing support to draw

* Add player info support and change hitboxes_internal to use 1 matrix operation

* Add get_latency and ticks_to_time and time_to_ticks

* Remove unnecessary build flag

* Add profiler init code and profile createmove

* Add tick_valid and profile backtrack

* Update esp to show profiler nodes

* Change aimbot visible_target logic and profile

* Change profile scope macro for clang

* Calculate a clock speed on linux

* Use intel intrinsic rdtsc

* Crossplatform fixes.

* more crosspaltform fixes

* basic lagexploit and some neat shit (#32)

Add lag exploit

* Update backtracking to copy the transforms it wants instead of letting setupbones recreate it again

* Cleanup redundent code and add linux code path

* Fix code define issues on linux
2018-04-03 21:16:44 +02:00

60 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# cwd into where this script is located
line=$(pidof hl2_linux)
arr=($line)
inst=$1
if [ $# == 0 ]; then
inst=0
fi
if [ ${#arr[@]} == 0 ]; then
echo TF2 isn\'t running!
exit
fi
if [ $inst -gt ${#arr[@]} ] || [ $inst == ${#arr[@]} ]; then
echo wrong index!
exit
fi
proc=${arr[$inst]}
echo Running instances: "${arr[@]}"
echo Attaching to "$proc"
#sudo ./detach $inst bin/libcathook.so
#if grep -q "$(realpath bin/libcathook.so)" /proc/"$proc"/maps; then
# echo already loaded
# exit
#fi
# pBypass for crash dumps being sent
# You may also want to consider using -nobreakpad in your launch options.
sudo rm -rf /tmp/dumps # Remove if it exists
sudo mkdir /tmp/dumps # Make it as root
sudo chmod 000 /tmp/dumps # No permissions
#FILENAME="/tmp/.gl$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6 | head -n 1)"
#cp "bin/Debug/libdoghook.so" "$FILENAME"
FILENAME=$(readlink -f "${0%/*}/bin/Debug/libdoghook.so")
echo loading "$FILENAME" to "$proc"
sudo killall -19 steam
sudo killall -19 steamwebhelper
sudo gdb -n \
-ex "attach $proc" \
-ex "set \$dlopen = (void*(*)(char*, int)) dlopen" \
-ex "call \$dlopen(\"$FILENAME\", 1)" \
-ex "call dlerror()" \
-ex 'print (char *) $2'
#rm $FILENAME
sudo killall -18 steamwebhelper
sudo killall -18 steam