diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..2b8eef88 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,10 @@ +version: 2 +jobs: + build: + docker: + - image: registry.gitlab.com/nullworks/cathook-ci-docker/ubuntu-cat-dependencies:build + steps: + - checkout + - run: + name: "Compiling cathook" + command: git submodule update --init --recursive; mkdir build; cd build; cmake -DEnableWarnings=0 ..; make -j8; cd .. diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 0d499a24..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,9 +0,0 @@ -image: registry.gitlab.com/nullworks/cathook-ci/ubuntu-cat-dependencies:build -variables: - DOCKER_DRIVER: overlay2 -build: - stage: build - before_script: - - "git submodule update --init --recursive" - script: - - "mkdir build; cd build; cmake ..; make; cd .." diff --git a/README.md b/README.md index 8422af00..0ab85e47 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cathook Training Software ![banner](http://i.imgur.com/w96wdtE.png) -[![pipeline status](https://gitlab.com/nullworks/cathook-ci/badges/master/pipeline.svg)](https://gitlab.com/nullworks/cathook-ci/commits/master) +[![CircleCI](https://circleci.com/gh/nullworks/cathook.svg?style=svg)](https://circleci.com/gh/nullworks/cathook) [cathook announcements channel in telegram](https://t.me/cathook_cheat) diff --git a/include/hacks/CMakeLists.txt b/include/hacks/CMakeLists.txt index 8de6a98b..0b807d88 100644 --- a/include/hacks/CMakeLists.txt +++ b/include/hacks/CMakeLists.txt @@ -28,6 +28,7 @@ target_sources(cathook PRIVATE "${CMAKE_CURRENT_LIST_DIR}/KillSay.hpp" "${CMAKE_CURRENT_LIST_DIR}/Killstreak.hpp" "${CMAKE_CURRENT_LIST_DIR}/LagExploit.hpp" + "${CMAKE_CURRENT_LIST_DIR}/LightESP.hpp" "${CMAKE_CURRENT_LIST_DIR}/Misc.hpp" "${CMAKE_CURRENT_LIST_DIR}/Noisemaker.hpp" "${CMAKE_CURRENT_LIST_DIR}/Spam.hpp" diff --git a/include/hacks/LightESP.hpp b/include/hacks/LightESP.hpp new file mode 100644 index 00000000..20d6eb79 --- /dev/null +++ b/include/hacks/LightESP.hpp @@ -0,0 +1,12 @@ +#include "common.hpp" +#include +namespace hacks +{ +namespace shared +{ +namespace lightesp +{ +void run(); +void draw(); +rgba_t LightESPColor(CachedEntity *ent); +}}} diff --git a/include/hacks/hacklist.hpp b/include/hacks/hacklist.hpp index 6cce8828..6be90786 100755 --- a/include/hacks/hacklist.hpp +++ b/include/hacks/hacklist.hpp @@ -12,6 +12,7 @@ #if ENABLE_VISUALS #include "ESP.hpp" +#include "LightESP.hpp" #include "SkinChanger.hpp" #include "Radar.hpp" #include "SpyAlert.hpp" diff --git a/install-all b/install-all index 12f79f6e..bd8fe531 100755 --- a/install-all +++ b/install-all @@ -1,37 +1,28 @@ -rm ../install-all +#!/usr/bin/env bash + +rm ../install-all # remove install file # # Install base Dependencies # -sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install build-essential git gcc-multilib g++-multilib software-properties-common gcc-snapshot g++-6-multilib gcc-6 g++-6 libssl-dev:i386 libboost-all-dev libc6-dev:i386 gdb libsdl2-dev libglew-dev:i386 libglew-dev libfreetype6-dev libfreetype6-dev:i386 cmake libpng-dev libssl-dev cmake gcc-multilib g++-multilib -y +sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y +sudo apt update +sudo apt install build-essential git gcc-multilib g++-multilib software-properties-common gcc-snapshot g++-6-multilib gcc-6 g++-6 libssl-dev:i386 libboost-all-dev libc6-dev:i386 gdb libsdl2-dev libglew-dev:i386 libglew-dev libfreetype6-dev libfreetype6-dev:i386 cmake libpng-dev libssl-dev cmake gcc-multilib g++-multilib -y # # Update cathook # -git fetch;git pull origin;git submodule update --remote --recursive - -# -# Install libglez -# - -cd libglez;mkdir build;cd build;cmake ..;make;sudo make install;cd ..;cd .. - -# -# Install libxoverlay -# - -cd libxoverlay;mkdir build;cd build;cmake ..;make;sudo make install;cd ..;cd .. - -# -# Install Simple-ipc -# - -cd simple-ipc;mkdir build;cd build;cmake ..;make;sudo make install;cd ..;cd .. +git fetch # fetch github repo for udpates +git pull origin # pull changes from github +git submodule update --remote --recursive # update submodules # # Build cathook # -mkdir build;cd build;cmake ..;make -j$(grep -c '^processor' /proc/cpuinfo); sudo make data; cd ..; cd .. +mkdir build;cd build #create a directory for building cathook +cmake ..;make -j$(grep -c '^processor' /proc/cpuinfo) # create makefile and build using all available threads +sudo make data # create /opt/cathook/data +cd ..; cd .. diff --git a/src/hacks/AutoDeadringer.cpp b/src/hacks/AutoDeadringer.cpp index 59d61853..18ff9f60 100644 --- a/src/hacks/AutoDeadringer.cpp +++ b/src/hacks/AutoDeadringer.cpp @@ -48,6 +48,8 @@ int NearbyEntities() } void CreateMove() { + if (!enabled) + return; if (CE_BAD(LOCAL_E)) return; if (!HasWeapon(LOCAL_E, 59)) diff --git a/src/hacks/CMakeLists.txt b/src/hacks/CMakeLists.txt index b3a8732d..f55f0e2f 100644 --- a/src/hacks/CMakeLists.txt +++ b/src/hacks/CMakeLists.txt @@ -26,6 +26,7 @@ if(NOT LagbotMode) "${CMAKE_CURRENT_LIST_DIR}/KillSay.cpp" "${CMAKE_CURRENT_LIST_DIR}/Killstreak.cpp" "${CMAKE_CURRENT_LIST_DIR}/LagExploit.cpp" + "${CMAKE_CURRENT_LIST_DIR}/LightESP.cpp" "${CMAKE_CURRENT_LIST_DIR}/Misc.cpp" "${CMAKE_CURRENT_LIST_DIR}/Noisemaker.cpp" "${CMAKE_CURRENT_LIST_DIR}/Trigger.cpp" diff --git a/src/hacks/LightESP.cpp b/src/hacks/LightESP.cpp new file mode 100644 index 00000000..fb1ad6da --- /dev/null +++ b/src/hacks/LightESP.cpp @@ -0,0 +1,84 @@ +#include "LightESP.hpp" + +namespace hacks +{ +namespace shared +{ +namespace lightesp +{ + +CatVar enable(CV_SWITCH, "lightesp_enabled", "0", "Enable LightESP", + "Lightweight ESP. Only shows head."); +Vector hitp[32]; +Vector minp[32]; +Vector maxp[32]; +bool drawEsp[32]; + +void run() +{ +#if ENABLE_VISUALS + if (!enable) + return; + for (int i = 1; i < g_IEngine->GetMaxClients(); i++) + { + CachedEntity *pEntity = ENTITY(i); + if (CE_BAD(pEntity) || !pEntity->m_bAlivePlayer()) + { + drawEsp[i] = false; + continue; + } + if (pEntity->m_iTeam() == LOCAL_E->m_iTeam() && + playerlist::IsDefault(pEntity)) + { + drawEsp[i] = false; + continue; + } + if (!pEntity->hitboxes.GetHitbox(0)) + continue; + hitp[i] = pEntity->hitboxes.GetHitbox(0)->center; + minp[i] = pEntity->hitboxes.GetHitbox(0)->min; + maxp[i] = pEntity->hitboxes.GetHitbox(0)->max; + drawEsp[i] = true; + } +#endif +} +void draw() +{ +#if ENABLE_VISUALS + if (!enable) + return; + for (int i = 1; i < g_IEngine->GetMaxClients(); i++) + { + if (!drawEsp[i]) + continue; + CachedEntity *pEntity = ENTITY(i); + if (CE_BAD(pEntity) || !pEntity->m_bAlivePlayer()) + continue; + Vector out; + if (draw::WorldToScreen(hitp[i], out)) + { + float size; + if (abs(maxp[i].x - minp[i].x) > abs(maxp[i].y - minp[i].y)) + size = abs(maxp[i].x - minp[i].x); + else + size = abs(maxp[i].y - minp[i].y); + + draw_api::draw_rect( + out.x, out.y, size / 4, size / 4, + hacks::shared::lightesp::LightESPColor(pEntity)); + } + } +#endif +} + +rgba_t LightESPColor(CachedEntity *ent) +{ + if (!playerlist::IsDefault(ent)) + { + return playerlist::Color(ent); + } + return colors::green; +} +} +} +} diff --git a/src/hooks/CreateMove.cpp b/src/hooks/CreateMove.cpp index 72ba67b2..592a477c 100644 --- a/src/hooks/CreateMove.cpp +++ b/src/hooks/CreateMove.cpp @@ -8,7 +8,6 @@ #include "common.hpp" #include "hack.hpp" #include "MiscTemporary.hpp" - #include #include @@ -337,6 +336,10 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time, PROF_SECTION(CM_backtracc); hacks::shared::backtrack::Run(); } + { + PROF_SECTION(CM_lightesp); + hacks::shared::lightesp::run(); + } { PROF_SECTION(CM_aimbot); hacks::shared::aimbot::CreateMove(); diff --git a/src/visual/drawmgr.cpp b/src/visual/drawmgr.cpp index 635a3059..15aaee97 100644 --- a/src/visual/drawmgr.cpp +++ b/src/visual/drawmgr.cpp @@ -144,6 +144,11 @@ void DrawCheatVisuals() hacks::shared::backtrack::Draw(); } IF_GAME(IsTF2()) + { + PROF_SECTION(DRAW_lightesp); + hacks::shared::lightesp::draw(); + } + IF_GAME(IsTF2()) { PROF_SECTION(DRAW_healarrows); hacks::tf2::healarrow::Draw(); diff --git a/src/visual/menu/ncc/Menu.cpp b/src/visual/menu/ncc/Menu.cpp index b60af187..aa26e49b 100644 --- a/src/visual/menu/ncc/Menu.cpp +++ b/src/visual/menu/ncc/Menu.cpp @@ -567,6 +567,10 @@ static const std::string list_tf2 = R"( "glow_self_b" ] ] + "LightESP" [ + "LightESP Menu" + "lightesp_enabled" + ] "Colors" [ "Colors Menu" "gui_rainbow" diff --git a/update b/update index b366214b..3ee7adde 100755 --- a/update +++ b/update @@ -1,11 +1,6 @@ #!/usr/bin/env bash -sudo echo Elevated #Get updated source code git fetch;git pull origin;git submodule update --remote --recursive -#Update dependencies -cd ./libglez/build; cmake ..; make;sudo make install;cd ..; cd .. -cd ./libxoverlay/build; cmake ..; make;sudo make install;cd ..; cd .. -cd ./simple-ipc/build; cmake ..; make;sudo make install;cd ..; cd .. #Update cathook cd build; cmake ..; make; cd ..; cd .. -printf "\n\n";printf '\e[1;34m%-6s\e' "Cathook update complete!";printf "\n\n" \ No newline at end of file +printf "\n\n";printf '\e[1;34m%-6s\e' "Cathook update complete!";printf "\n\n"