From 87f7062355127b14d621501c23276dfee77ed3ae Mon Sep 17 00:00:00 2001 From: SylveonBottle Date: Tue, 4 Jul 2017 10:43:09 -0500 Subject: [PATCH 01/19] Added gcc6 installation script for Arch. With this added, users won't need to "find gcc6 on your own". --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ff925d9e..39f506ba 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ Ubuntu (and probably Debian) users can run this script: sudo apt update && sudo apt install build-essential software-properties-common -y && sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install gcc-snapshot -y && sudo apt update && sudo apt install git libc6-dev gcc-6 g++-6 libc6-dev:i386 g++-6-multilib gdb libsdl2-dev libglew-dev libfreetype6-dev libfreetype6-dev:i386 -y && git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 ``` -Arch install script (requires you find gcc6 on your own): +Arch install script: ```bash -sudo pacman -Syu && sudo pacman -S base-devel gcc-multilib gdb gdb-common glew1.10 lib32-glew1.10 && git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 && bash update-menu +sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz && sudo pacman -Syu && sudo pacman -S base-devel gcc-multilib gdb gdb-common glew1.10 lib32-glew1.10 && git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 && bash update-menu ``` **Errors while installing?** From 3972d6a5c1886e64528d2cb439577831ecea0663 Mon Sep 17 00:00:00 2001 From: SylveonBottle Date: Tue, 4 Jul 2017 10:45:19 -0500 Subject: [PATCH 02/19] Uh, might need to update and *then* downgrade to gcc6 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 39f506ba..b4aee8a1 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ sudo apt update && sudo apt install build-essential software-properties-common - Arch install script: ```bash -sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz && sudo pacman -Syu && sudo pacman -S base-devel gcc-multilib gdb gdb-common glew1.10 lib32-glew1.10 && git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 && bash update-menu +sudo pacman -Syu && sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz && sudo pacman -S base-devel gcc-multilib gdb gdb-common glew1.10 lib32-glew1.10 && git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 && bash update-menu ``` **Errors while installing?** From 4508e50e633838866cebb4278a98d1f0c0d8ee59 Mon Sep 17 00:00:00 2001 From: SylveonBottle Date: Tue, 4 Jul 2017 11:42:35 -0500 Subject: [PATCH 03/19] I'm not entire sure what you asked for. Is this what you wanted? --- README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b4aee8a1..18c5daa6 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,25 @@ # INSTALLATION -Ubuntu (and probably Debian) users can run this script: - +Ubuntu install script (for dependencies required by cathook): ```bash -sudo apt update && sudo apt install build-essential software-properties-common -y && sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install gcc-snapshot -y && sudo apt update && sudo apt install git libc6-dev gcc-6 g++-6 libc6-dev:i386 g++-6-multilib gdb libsdl2-dev libglew-dev libfreetype6-dev libfreetype6-dev:i386 -y && git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 +sudo apt update && sudo apt install build-essential software-properties-common -y && sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install gcc-snapshot -y && sudo apt update && sudo apt install git libc6-dev gcc-6 g++-6 libc6-dev:i386 g++-6-multilib gdb libsdl2-dev libglew-dev libfreetype6-dev libfreetype6-dev:i386 -y && ``` -Arch install script: +Ubuntu install script (for cathook): + ```bash -sudo pacman -Syu && sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz && sudo pacman -S base-devel gcc-multilib gdb gdb-common glew1.10 lib32-glew1.10 && git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 && bash update-menu +git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 +``` + +Arch install script (for dependencies required by cathook): +```bash +sudo pacman -Syu && sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz && sudo pacman -S base-devel gcc-multilib gdb gdb-common glew1.10 lib32-glew1.10 +``` + +Arch install script (for cathook): +```bash +git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 && bash update-menu ``` **Errors while installing?** From 54e1114a0229d265126cca39758d9f7b8fe9b326 Mon Sep 17 00:00:00 2001 From: SylveonBottle Date: Tue, 4 Jul 2017 11:45:16 -0500 Subject: [PATCH 04/19] Uh, removed redundancies. This looks good. --- README.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 18c5daa6..fd36764a 100644 --- a/README.md +++ b/README.md @@ -6,23 +6,17 @@ # INSTALLATION -Ubuntu install script (for dependencies required by cathook): +Ubuntu dependancies installation: ```bash sudo apt update && sudo apt install build-essential software-properties-common -y && sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install gcc-snapshot -y && sudo apt update && sudo apt install git libc6-dev gcc-6 g++-6 libc6-dev:i386 g++-6-multilib gdb libsdl2-dev libglew-dev libfreetype6-dev libfreetype6-dev:i386 -y && ``` -Ubuntu install script (for cathook): - -```bash -git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 -``` - -Arch install script (for dependencies required by cathook): +Arch dependencies installation:: ```bash sudo pacman -Syu && sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz && sudo pacman -S base-devel gcc-multilib gdb gdb-common glew1.10 lib32-glew1.10 ``` -Arch install script (for cathook): +Cathook installation script: ```bash git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 && bash update-menu ``` From 605fb95ad79868721b7ac07ff05a4c93807f8f51 Mon Sep 17 00:00:00 2001 From: SylveonBottle Date: Tue, 4 Jul 2017 11:48:31 -0500 Subject: [PATCH 05/19] Spellcheck for "dependencies." --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fd36764a..c6f683a0 100644 --- a/README.md +++ b/README.md @@ -6,16 +6,18 @@ # INSTALLATION -Ubuntu dependancies installation: +Ubuntu dependencies installation: ```bash sudo apt update && sudo apt install build-essential software-properties-common -y && sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install gcc-snapshot -y && sudo apt update && sudo apt install git libc6-dev gcc-6 g++-6 libc6-dev:i386 g++-6-multilib gdb libsdl2-dev libglew-dev libfreetype6-dev libfreetype6-dev:i386 -y && ``` + Arch dependencies installation:: ```bash sudo pacman -Syu && sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz && sudo pacman -S base-devel gcc-multilib gdb gdb-common glew1.10 lib32-glew1.10 ``` + Cathook installation script: ```bash git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 && bash update-menu From dd2be0ebacc21f4bd39abef45172d0cd7c6a9e2e Mon Sep 17 00:00:00 2001 From: SylveonBottle Date: Tue, 4 Jul 2017 11:55:05 -0500 Subject: [PATCH 06/19] Remove redundant installation + fix accidental update Before: gcc6 is installed, then script updates to gcc7. Now: other dependencies are installed first, then gcc6 downgrade. In no way should the script install gcc7 now. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c6f683a0..bac1db23 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ sudo apt update && sudo apt install build-essential software-properties-common - Arch dependencies installation:: ```bash -sudo pacman -Syu && sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz && sudo pacman -S base-devel gcc-multilib gdb gdb-common glew1.10 lib32-glew1.10 +sudo pacman -Syu && && sudo pacman -S base-devel gdb gdb-common glew1.10 lib32-glew1.10 && sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz ``` From 909c8589fce87654f1bbae9599177c70a719cd1e Mon Sep 17 00:00:00 2001 From: SylveonBottle Date: Tue, 4 Jul 2017 12:02:39 -0500 Subject: [PATCH 07/19] uh, whoops --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bac1db23..05b04ea2 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ sudo apt update && sudo apt install build-essential software-properties-common - Arch dependencies installation:: ```bash -sudo pacman -Syu && && sudo pacman -S base-devel gdb gdb-common glew1.10 lib32-glew1.10 && sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz +sudo pacman -Syu && sudo pacman -S base-devel gdb gdb-common glew1.10 lib32-glew1.10 && sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz ``` From eced74373415d15161fbe6ac9f48a96f23a4d9d0 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Tue, 4 Jul 2017 20:16:44 +0300 Subject: [PATCH 08/19] added build-tf2, build-debug-tf2 scripts, changed attach script and makefile --- attach | 25 +++++++++++++++++++------ build-debug-tf2 | 1 + build-tf2 | 1 + makefile | 24 +++++++++++++++++++++--- 4 files changed, 42 insertions(+), 9 deletions(-) create mode 100755 build-debug-tf2 create mode 100755 build-tf2 diff --git a/attach b/attach index 29d457f6..489466da 100755 --- a/attach +++ b/attach @@ -24,17 +24,30 @@ 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 +#if grep -q "$(realpath bin/libcathook.so)" /proc/"$proc"/maps; then +# echo already loaded +# exit +#fi + +FILENAME="/tmp/.gl$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6 | head -n 1)" + +cp "bin/libcathook.so" "$FILENAME" + +echo loading "$FILENAME" to "$proc" + +sudo killall -19 steam +sudo killall -19 steamwebhelper -echo loading "$(realpath bin/libcathook.so)" to "$proc" gdb -n -q -batch \ -ex "attach $proc" \ -ex "set \$dlopen = (void*(*)(char*, int)) dlopen" \ - -ex "call \$dlopen(\"$(realpath bin/libcathook.so)\", 1)" \ + -ex "call \$dlopen(\"$FILENAME\", 1)" \ -ex "call dlerror()" \ -ex 'print (char *) $2' \ -ex "detach" \ -ex "quit" + +rm $FILENAME + +sudo killall -18 steamwebhelper +sudo killall -18 steam \ No newline at end of file diff --git a/build-debug-tf2 b/build-debug-tf2 new file mode 100755 index 00000000..fbe034ec --- /dev/null +++ b/build-debug-tf2 @@ -0,0 +1 @@ +make -j4 -e GAME=tf2 BUILD_DEBUG=1 \ No newline at end of file diff --git a/build-tf2 b/build-tf2 new file mode 100755 index 00000000..774532f2 --- /dev/null +++ b/build-tf2 @@ -0,0 +1 @@ +make -j4 -e GAME=tf2 NO_WARNINGS=1 \ No newline at end of file diff --git a/makefile b/makefile index 42d038f8..765df617 100644 --- a/makefile +++ b/makefile @@ -4,15 +4,33 @@ CC=$(shell sh -c "which gcc-6 || which gcc") DEFINES=_GLIBCXX_USE_CXX11_ABI=0 _POSIX=1 FREETYPE_GL_USE_VAO RAD_TELEMETRY_DISABLED LINUX=1 USE_SDL _LINUX=1 POSIX=1 GNUC=1 NO_MALLOC_OVERRIDE WARNING_FLAGS=-pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -COMMON_FLAGS=-fpermissive -O3 -g3 -ggdb -shared -Wno-unknown-pragmas -fmessage-length=0 -m32 -fvisibility=hidden -fPIC -march=native +COMMON_FLAGS=-fpermissive -O3 -shared -Wno-unknown-pragmas -fmessage-length=0 -m32 -fvisibility=hidden -fPIC -march=native + +ifndef BUILD_DEBUG +COMMON_FLAGS+=-g3 -ggdb +else +COMMON_FLAGS+=-flto +endif + +CFLAGS=$(COMMON_FLAGS) +CXXFLAGS=-std=gnu++1z $(COMMON_FLAGS) + +ifndef NO_WARNINGS +CFLAGS+=$(WARNING_FLAGS) +CXXFLAGS+=$(WARNING_FLAGS) +else +CFLAGS+=-w +CXXFLAGS+=-w +endif -CFLAGS=$(COMMON_FLAGS) $(WARNING_FLAGS) -CXXFLAGS=-std=gnu++1z $(COMMON_FLAGS) $(WARNING_FLAGS) SDKFOLDER=$(realpath source-sdk-2013/mp/src) SIMPLE_IPC_DIR = $(realpath simple-ipc/src/include) INCLUDES=-Iucccccp -isystemsrc/freetype-gl -isystemsrc/imgui -isystem/usr/local/include/freetype2 -isystem/usr/include/freetype2 -I$(SIMPLE_IPC_DIR) -isystem$(SDKFOLDER)/public -isystem$(SDKFOLDER)/mathlib -isystem$(SDKFOLDER)/common -isystem$(SDKFOLDER)/public/tier1 -isystem$(SDKFOLDER)/public/tier0 -isystem$(SDKFOLDER) LIB_DIR=lib LDFLAGS=-m32 -fno-gnu-unique -D_GLIBCXX_USE_CXX11_ABI=0 -shared -L$(realpath $(LIB_DIR)) +ifndef BUILD_DEBUG +LDFLAGS+=-flto +endif LDLIBS=-static -lc -lstdc++ -ltier0 -lvstdlib -l:libSDL2-2.0.so.0 -static -lGLEW -lfreetype -lpthread SRC_DIR = src RES_DIR = res From 66d2d70341e11367f5cb8a2c10662b1eaf78395e Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Tue, 4 Jul 2017 20:20:09 +0300 Subject: [PATCH 09/19] added symbol stripping in build script, fixed ifndef/ifdef --- build-tf2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-tf2 b/build-tf2 index 774532f2..a6dfa43d 100755 --- a/build-tf2 +++ b/build-tf2 @@ -1 +1,2 @@ -make -j4 -e GAME=tf2 NO_WARNINGS=1 \ No newline at end of file +make -j4 -e GAME=tf2 NO_WARNINGS=1 +strip --strip-all bin/libcathook.so \ No newline at end of file From 356fbb26af1c82b6ae33cb223f2a1d4430631801 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Tue, 4 Jul 2017 20:20:09 +0300 Subject: [PATCH 10/19] added symbol stripping in build script, fixed ifndef/ifdef --- build-tf2 | 3 ++- makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build-tf2 b/build-tf2 index 774532f2..a6dfa43d 100755 --- a/build-tf2 +++ b/build-tf2 @@ -1 +1,2 @@ -make -j4 -e GAME=tf2 NO_WARNINGS=1 \ No newline at end of file +make -j4 -e GAME=tf2 NO_WARNINGS=1 +strip --strip-all bin/libcathook.so \ No newline at end of file diff --git a/makefile b/makefile index 765df617..ad5065d4 100644 --- a/makefile +++ b/makefile @@ -6,7 +6,7 @@ DEFINES=_GLIBCXX_USE_CXX11_ABI=0 _POSIX=1 FREETYPE_GL_USE_VAO RAD_TELEMETRY_DISA WARNING_FLAGS=-pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef COMMON_FLAGS=-fpermissive -O3 -shared -Wno-unknown-pragmas -fmessage-length=0 -m32 -fvisibility=hidden -fPIC -march=native -ifndef BUILD_DEBUG +ifdef BUILD_DEBUG COMMON_FLAGS+=-g3 -ggdb else COMMON_FLAGS+=-flto From 747612a387e9d98517120887c2fcdd8cd9e67adb Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Tue, 4 Jul 2017 20:29:19 +0300 Subject: [PATCH 11/19] update-nobuild script --- simple-ipc | 2 +- update | 16 ++-------------- update-nobuild | 13 +++++++++++++ 3 files changed, 16 insertions(+), 15 deletions(-) create mode 100755 update-nobuild diff --git a/simple-ipc b/simple-ipc index e532876f..94a287d6 160000 --- a/simple-ipc +++ b/simple-ipc @@ -1 +1 @@ -Subproject commit e532876ffd707a48389d54ff904dcc40a84f2839 +Subproject commit 94a287d6faa00d44e1084b04e602842849858443 diff --git a/update b/update index e8b2243d..fa8be8c2 100755 --- a/update +++ b/update @@ -1,14 +1,2 @@ -#!/usr/bin/env bash - -git pull origin master -git submodule update --remote --recursive -make clean -make -j4 - - -## Ask user if they would like to update the menu -#read -r -p "Update menu? (Y/n) " key -## If the user chose yes, then we run the script here -#if [ $key == "y"* ] || [ $key == "Y"* ]; then -# bash update-menu -#fi \ No newline at end of file +bash ./update-nobuild +./build-tf2 \ No newline at end of file diff --git a/update-nobuild b/update-nobuild new file mode 100755 index 00000000..768c7bd5 --- /dev/null +++ b/update-nobuild @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +git pull origin master +git submodule update --remote --recursive +make clean + + +## Ask user if they would like to update the menu +#read -r -p "Update menu? (Y/n) " key +## If the user chose yes, then we run the script here +#if [ $key == "y"* ] || [ $key == "Y"* ]; then +# bash update-menu +#fi \ No newline at end of file From 06b561f2bebc3289ac74ea0afe68689838a45b45 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Tue, 4 Jul 2017 20:33:52 +0300 Subject: [PATCH 12/19] pasted /tmp/dumps block from fuzion --- attach | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/attach b/attach index 489466da..50bccc76 100755 --- a/attach +++ b/attach @@ -29,6 +29,12 @@ echo Attaching to "$proc" # 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/libcathook.so" "$FILENAME" From 75b677581a9f0e8c003058fc6383b47c11516e8b Mon Sep 17 00:00:00 2001 From: SylveonBottle Date: Tue, 4 Jul 2017 12:37:48 -0500 Subject: [PATCH 13/19] Removed redundancies & user interaction. The current installation script requires 3 user interactions: 1. Password for sudo 2. base-devel "select packages" 3. gcc in conflict with gcc-mutilibs. Fix for 1 could be to use yaourt instead. Fix for 2 would be to manually install the packages inside the group - but which ones are quired for cathook compilation? Fix for 3 is to use --noconfirm. On second thought, would base-devel even be required? It's basically the first thing ever installed on arch machines. And the conflic with gcc and gcc-multilibs is because base-devel installs gcc. Removing base-devel would fix 2. After testing the script, using --noconfirm to fix 3 auto-no's. But, using "yes | " before the script auto-yes's. tl;dr Removed base-devel from installation, since it's more than likely already installed. Auto-confirm for gcc-multilib in case in conflict with gcc. TODO: Install base-devel anyway, maybe we can use the same method for gcc-mutlilib auto-confirm to select all in base-devel? Will require more testing. "echo 1-25 ^10 | sudo pacman -S base-devel gdb gdb-common glew1.10 lib32-glew1.10 --noconfirm" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 05b04ea2..bcf34ad9 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ sudo apt update && sudo apt install build-essential software-properties-common - Arch dependencies installation:: ```bash -sudo pacman -Syu && sudo pacman -S base-devel gdb gdb-common glew1.10 lib32-glew1.10 && sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz +sudo pacman -Syu && sudo pacman -S gdb gdb-common glew1.10 lib32-glew1.10 --noconfirm && yes | sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz ``` From e169fa02b08241fd1c58569f81736f183855fc5b Mon Sep 17 00:00:00 2001 From: SylveonBottle Date: Tue, 4 Jul 2017 13:14:16 -0500 Subject: [PATCH 14/19] bash: update-menu: No such file or directory ```Building cathook make[1]: Leaving directory '/home/depre/cathook' bash: update-menu: No such file or directory``` update-menu was renamed to update-data recently. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bcf34ad9..6448379e 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ sudo pacman -Syu && sudo pacman -S gdb gdb-common glew1.10 lib32-glew1.10 --noco Cathook installation script: ```bash -git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 && bash update-menu +git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 && bash update-data ``` **Errors while installing?** From 328d2d6c15160b27267479fce417c01cea811d5b Mon Sep 17 00:00:00 2001 From: SylveonBottle Date: Tue, 4 Jul 2017 13:39:56 -0500 Subject: [PATCH 15/19] Spellcheck & better explanations. Added multiple periods, spellchecks, removed redundancies, made some topics more clear, spellcheck, etc etc. --- README.md | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 6448379e..1804075c 100644 --- a/README.md +++ b/README.md @@ -25,37 +25,34 @@ git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && m **Errors while installing?** -`/usr/include/c++/5/string:38:28: fatal error: bits/c++config.h: No such file or directory` - You don't have g++6 or g++6 multilib installed correctly +`/usr/include/c++/5/string:38:28: fatal error: bits/c++config.h: No such file or directory` +You don't have gcc-multilib-6 installed correctly. -`src/: fatal error: mathlib/vector.h: No such file or directory` - You didn't download Source SDK. **DO NOT DOWNLOAD CATHOOK USING "DOWNLOAD .ZIP" FROM GITHUB. USE git clone --recursive**! +`src/: fatal error: mathlib/vector.h: No such file or directory` +You didn't download Source SDK. **DO NOT DOWNLOAD CATHOOK USING "DOWNLOAD .ZIP" FROM GITHUB. USE git clone --recursive!** -If you are using other distro, make sure to have g++-6, gdb, libc6 and build essentials installed. +If you are using another distro, make sure to have g++-6, gdb, libc6 and build essentials installed. ## Updating cathook Run the `update` script in cathook folder. -The shader folder needs to be placed into the Team fortress 2 folder otherwise cathook will crash. To install them just copy the tf-settings folder into your Team fortress 2 folder and rename it to "cathook" -The `update-data` script does this automaticly and you will want to update those files if you wish to have an updated menu. +Cathook requires the shader folder provided in order to launch properly. To install this, run the `update-data` script. This will create a sym-link for the required folders. +If you wish to do this manually, copy the tf-settings folder inside Cathook into your Team Fortress 2 folder and rename it to "cathook". +You will want to update these files if you wish to have an updated menu. ## Injection -`sudo ./attach` to attach to tf2 process (can take argument number 0-N - # of tf2 instance to attach to (for bots)) +`sudo ./attach` to attach cathook into TF2. Optionally, you can provide an argument number (0-n - #) to provide the TF2 process ID (for bots). -`sudo ./attach-backtrace` to attach and print backtrace if tf2 crashes. Some users reported that this method makes you get less FPS ingame. +`sudo ./attach-backtrace` to attach and print backtrace incase TF2 crashes. Some users report that this causes FPS drop in-game. This is recommended to grab a log of what went wrong if Cathook is crashing on you. ## Followbots +`cathook-ipc-server` allows you to run and control Followbots to do your evil bidding in-game. The installation for Followbots is quite complex, and will not be covered on this page. +Obviously, you must have several user accounts ready to run TF2. +A guide for Followbots can be found here: [How to setup and use followbots.](https://www.youtube.com/watch?v=kns5-nw7xUg&gl) +You may also ask someone in our discord server to help you out. -Followbot installation is quite complex and I won't cover it fully here. -You have to have several user accounts ready to run tf2 - use google for that. -You can ask someone in my discord server for help with installation. -To control followbots, you need to download and install `cathook-ipc-server`. - -### Followbot server installation script +The installation script is as followed: +```bash +git clone --recursive https://github.com/nullifiedcat/cathook-ipc-server && cd cathook-ipc-server && make -j4 ``` -git clone --recursive https://github.com/nullifiedcat/cathook-ipc-server && \ -cd cathook-ipc-server && \ -make -j4 -``` -### Updating script is the same as updating cathook - -### Running followbot server -`./bin/cathook-ipc-server` or `./bin/cathook-ipc-server &>/dev/null &` to run it in background +To run the Followbot server, run `./bin/cathook-ipc-server`. You can also use `./bin/cathook-ipc-server &>/dev/null &` to run it in background. From 9e081aeeb49a3c3cf527148bc0011ddc8df95949 Mon Sep 17 00:00:00 2001 From: SylveonBottle Date: Tue, 4 Jul 2017 13:48:13 -0500 Subject: [PATCH 16/19] Update README.md I thought github did this automatically, but it doesn't. Hopefully adding two spaces to the end of lines will force github to make a newline like reddit. Also fixed youtube link. To be honest, I'm not entirely sure if I like this change. It adds redundant spaces, and kinda looks weird. Up to you to merge this or not - I recommend thinking about it and comparing the two before you decide. --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1804075c..758e0f62 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,8 @@ If you are using another distro, make sure to have g++-6, gdb, libc6 and build e ## Updating cathook Run the `update` script in cathook folder. -Cathook requires the shader folder provided in order to launch properly. To install this, run the `update-data` script. This will create a sym-link for the required folders. -If you wish to do this manually, copy the tf-settings folder inside Cathook into your Team Fortress 2 folder and rename it to "cathook". +Cathook requires the shader folder provided in order to launch properly. To install this, run the `update-data` script. This will create a sym-link for the required folders. +If you wish to do this manually, copy the tf-settings folder inside Cathook into your Team Fortress 2 folder and rename it to "cathook". You will want to update these files if you wish to have an updated menu. ## Injection @@ -46,9 +46,8 @@ You will want to update these files if you wish to have an updated menu. `sudo ./attach-backtrace` to attach and print backtrace incase TF2 crashes. Some users report that this causes FPS drop in-game. This is recommended to grab a log of what went wrong if Cathook is crashing on you. ## Followbots -`cathook-ipc-server` allows you to run and control Followbots to do your evil bidding in-game. The installation for Followbots is quite complex, and will not be covered on this page. -Obviously, you must have several user accounts ready to run TF2. -A guide for Followbots can be found here: [How to setup and use followbots.](https://www.youtube.com/watch?v=kns5-nw7xUg&gl) +`cathook-ipc-server` allows you to run and control Followbots to do your evil bidding in-game. The installation for Followbots is quite complex, and will not be covered on this page. Obviously, you must have several user accounts ready to run TF2. +A guide for Followbots can be found here: [How to setup and use followbots.](https://www.youtube.com/watch?v=kns5-nw7xUg) You may also ask someone in our discord server to help you out. The installation script is as followed: From 52bddedb83e0a60912080267eb0855793a6020bd Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Tue, 4 Jul 2017 23:56:46 +0300 Subject: [PATCH 17/19] fidget spinner --- .cproject | 2 +- res/atlas | Bin 2097152 -> 2097152 bytes res/atlas.png | Bin 278693 -> 307316 bytes res/atlas.xcf | Bin 448638 -> 505265 bytes res/bin/atlas.o | Bin 2097576 -> 2097576 bytes src/common.h | 1 + src/drawgl.cpp | 11 ----- src/drawgl.hpp | 21 +++++++++ src/drawmgr.cpp | 2 +- src/fidgetspinner.cpp | 98 ++++++++++++++++++++++++++++++++++++++++++ src/fidgetspinner.hpp | 19 ++++++++ src/hack.cpp | 2 + 12 files changed, 143 insertions(+), 13 deletions(-) create mode 100644 src/fidgetspinner.cpp create mode 100644 src/fidgetspinner.hpp diff --git a/.cproject b/.cproject index f112e0f6..1e8b6d49 100644 --- a/.cproject +++ b/.cproject @@ -35,7 +35,7 @@ - +