Nitpicking
Signed-off-by: mpmjcvuut <mpmjcvuut@protonmail.ch>
This commit is contained in:
parent
ae80783ed3
commit
d4e1c330e8
@ -9,7 +9,7 @@ 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 libc6-dev gcc-6 g++-6 g++-6-multilib gdb -y && git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4
|
||||
```
|
||||
|
||||
**Errors while installing?**
|
||||
**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
|
||||
|
||||
|
2
TODO
2
TODO
@ -15,7 +15,7 @@ inspect shit
|
||||
TTS
|
||||
noise spam
|
||||
team name spam (pre round team name spam thing)
|
||||
insta taunt (taunts for like .5 ms and then you can do it again lithium has it)
|
||||
insta taunt (taunts for like .5 ms and then you can do it again lithium has it)
|
||||
auto vacc
|
||||
namesteal
|
||||
autovote
|
||||
|
24
attach
24
attach
@ -1,35 +1,35 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
line=`pidof hl2_linux`
|
||||
line=$(pidof hl2_linux)
|
||||
arr=($line)
|
||||
inst=$1
|
||||
if [ $# == 0 ]; then
|
||||
inst=0
|
||||
if [ $# == 0 ]; then
|
||||
inst=0
|
||||
fi
|
||||
|
||||
if [ ${#arr[@]} == 0 ]; then
|
||||
echo tf2 isn\'t running!
|
||||
exit
|
||||
echo TF2 isn\'t running!
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $inst -gt ${#arr[@]} ] || [ $inst == ${#arr[@]} ]; then
|
||||
echo wrong index!
|
||||
exit
|
||||
echo wrong index!
|
||||
exit
|
||||
fi
|
||||
|
||||
proc=${arr[$inst]}
|
||||
|
||||
echo Running instances: ${arr[@]}
|
||||
echo Attaching to $proc
|
||||
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
|
||||
if grep -q "$(realpath bin/libcathook.so)" /proc/"$proc"/maps; then
|
||||
echo already loaded
|
||||
exit
|
||||
fi
|
||||
|
||||
echo loading $(realpath bin/libcathook.so) to $proc
|
||||
echo loading "$(realpath bin/libcathook.so)" to "$proc"
|
||||
gdb -n -q -batch \
|
||||
-ex "attach $proc" \
|
||||
-ex "set \$dlopen = (void*(*)(char*, int)) dlopen" \
|
||||
|
@ -1,35 +1,35 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
line=`pidof hl2_linux`
|
||||
line=$(pidof hl2_linux)
|
||||
arr=($line)
|
||||
inst=$1
|
||||
if [ $# == 0 ]; then
|
||||
inst=0
|
||||
if [ $# == 0 ]; then
|
||||
inst=0
|
||||
fi
|
||||
|
||||
if [ ${#arr[@]} == 0 ]; then
|
||||
echo tf2 isn\'t running!
|
||||
exit
|
||||
echo tf2 isn\'t running!
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $inst -gt ${#arr[@]} ] || [ $inst == ${#arr[@]} ]; then
|
||||
echo wrong index!
|
||||
exit
|
||||
echo wrong index!
|
||||
exit
|
||||
fi
|
||||
|
||||
proc=${arr[$inst]}
|
||||
|
||||
echo Running instances: ${arr[@]}
|
||||
echo Attaching to $proc
|
||||
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
|
||||
if grep -q "$(realpath bin/libcathook.so)" /proc/"$proc"/maps; then
|
||||
echo already loaded
|
||||
exit
|
||||
fi
|
||||
|
||||
echo loading $(realpath bin/libcathook.so) to $proc
|
||||
echo loading "$(realpath bin/libcathook.so)" to "$proc"
|
||||
gdb -n -q -batch \
|
||||
-ex "attach $proc" \
|
||||
-ex "set \$dlopen = (void*(*)(char*, int)) dlopen" \
|
||||
@ -38,4 +38,4 @@ gdb -n -q -batch \
|
||||
-ex 'print (char *) $2' \
|
||||
-ex "catch syscall exit exit_group" \
|
||||
-ex "continue" \
|
||||
-ex "backtrace"
|
||||
-ex "backtrace"
|
||||
|
26
detach
26
detach
@ -1,37 +1,37 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
line=`pidof hl2_linux`
|
||||
line=$(pidof hl2_linux)
|
||||
arr=($line)
|
||||
inst=$1
|
||||
if [ $# == 0 ]; then
|
||||
inst=0
|
||||
if [ $# == 0 ]; then
|
||||
inst=0
|
||||
fi
|
||||
|
||||
if [ ${#arr[@]} == 0 ]; then
|
||||
echo tf2 isn\'t running!
|
||||
exit
|
||||
echo TF2 isn\'t running!
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $inst -gt ${#arr[@]} ] || [ $inst == ${#arr[@]} ]; then
|
||||
echo wrong index!
|
||||
exit
|
||||
echo wrong index!
|
||||
exit
|
||||
fi
|
||||
|
||||
echo Running instances: ${arr[@]}
|
||||
echo Detaching from ${arr[$1]}
|
||||
echo Running instances: "${arr[@]}"
|
||||
echo Detaching from "${arr[$1]}"
|
||||
|
||||
if grep -q $(realpath bin/libcathook.so) /proc/${arr[$1]}/maps; then
|
||||
if grep -q "$(realpath bin/libcathook.so)" /proc/"${arr[$1]}"/maps; then
|
||||
gdb -n -q -batch \
|
||||
-ex "attach ${arr[$1]}" \
|
||||
-ex "set \$dlopen = (void*(*)(char*, int)) dlopen" \
|
||||
-ex "set \$dlclose = (int(*)(void*)) dlclose" \
|
||||
-ex "set \$library = \$dlopen(\"$(realpath bin/libcathook.so)\", 6)" \
|
||||
-ex "print \$library" \
|
||||
-ex "sharedlibrary ." \
|
||||
-ex "sharedlibrary ." \
|
||||
-ex "call \$dlclose(\$library)" \
|
||||
-ex "call \$dlclose(\$library)" \
|
||||
-ex "detach"
|
||||
echo "Detached"
|
||||
else
|
||||
echo "not found!"
|
||||
echo "not found!"
|
||||
fi
|
||||
|
@ -1,14 +1,16 @@
|
||||
if [ ! -d "~/.cathook" ]; then
|
||||
mkdir ~/.cathook
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -d "$HOME/.cathook" ]; then
|
||||
mkdir "$HOME"/.cathook
|
||||
fi
|
||||
|
||||
if [ ! -f "~/.cathook/killsays.txt" ]; then
|
||||
cp res/killsays.txt ~/.cathook
|
||||
if [ ! -f "$HOME/.cathook/killsays.txt" ]; then
|
||||
cp res/killsays.txt "$HOME"/.cathook
|
||||
fi
|
||||
|
||||
if [ ! -f "~/.cathook/spam.txt" ]; then
|
||||
cp res/spam.txt ~/.cathook
|
||||
if [ ! -f "$HOME/.cathook/spam.txt" ]; then
|
||||
cp res/spam.txt "$HOME"/.cathook
|
||||
fi
|
||||
|
||||
echo Default killsay/spam files installed, EDIT THEM!
|
||||
gnome-open ~/.cathook
|
||||
echo "Default killsay/spam files installed, EDIT THEM!"
|
||||
xdg-open "$HOME"/.cathook
|
||||
|
6
makefile
6
makefile
@ -29,10 +29,10 @@ CXXFLAGS += -DGIT_COMMIT_HASH="\"$(GIT_COMMIT_HASH)\"" -DGIT_COMMIT_DATE="\"$(GI
|
||||
all:
|
||||
mkdir -p $(TARGET_DIR)
|
||||
$(MAKE) $(TARGET)
|
||||
|
||||
|
||||
.cpp.o:
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
|
||||
%.d: %.cpp
|
||||
$(CXX) -M $(CXXFLAGS) $< > $@
|
||||
|
||||
@ -43,7 +43,7 @@ clean:
|
||||
find src -type f -name '*.o' -delete
|
||||
find src -type f -name '*.d' -delete
|
||||
rm -rf ./bin
|
||||
|
||||
|
||||
ifneq ($(MAKECMDGOALS), clean)
|
||||
-include $(DEPENDS)
|
||||
endif
|
||||
|
5
reattach
5
reattach
@ -1,4 +1,3 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo ./detach $1
|
||||
sudo ./attach $1
|
||||
sudo ./detach "$1" && sudo ./attach "$1"
|
||||
|
0
res/.gitignore
vendored
0
res/.gitignore
vendored
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
convert $1.png -depth 8 -format rgba $1.rgba
|
||||
mv $1.rgba $1
|
||||
objcopy --input binary --output elf32-i386 --binary-architecture i386 $1 $1.o
|
||||
mv $1.o bin/$1.o
|
||||
#!/usr/bin/env bash
|
||||
convert "$1".png -depth 8 -format rgba "$1".rgba
|
||||
mv "$1".rgba "$1"
|
||||
objcopy --input binary --output elf32-i386 --binary-architecture i386 "$1" "$1".o
|
||||
mv "$1".o bin/"$1".o
|
||||
|
Reference in New Issue
Block a user