Added unknowncheats build configuration without auto updater

This commit is contained in:
IMXNOOBX
2023-10-05 16:56:12 +02:00
parent 06b4eff2c6
commit 74929c1342
5 changed files with 96 additions and 11 deletions
+7 -1
View File
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33627.172
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "memory-external", "memory-external\memory-external.vcxproj", "{B87AB66D-73CC-48A1-9D3A-76B2ECBD3A64}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cs2-external-esp", "memory-external\memory-external.vcxproj", "{B87AB66D-73CC-48A1-9D3A-76B2ECBD3A64}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,6 +11,8 @@ Global
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
Unknowncheats|x64 = Unknowncheats|x64
Unknowncheats|x86 = Unknowncheats|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B87AB66D-73CC-48A1-9D3A-76B2ECBD3A64}.Debug|x64.ActiveCfg = Debug|x64
@@ -21,6 +23,10 @@ Global
{B87AB66D-73CC-48A1-9D3A-76B2ECBD3A64}.Release|x64.Build.0 = Release|x64
{B87AB66D-73CC-48A1-9D3A-76B2ECBD3A64}.Release|x86.ActiveCfg = Release|Win32
{B87AB66D-73CC-48A1-9D3A-76B2ECBD3A64}.Release|x86.Build.0 = Release|Win32
{B87AB66D-73CC-48A1-9D3A-76B2ECBD3A64}.Unknowncheats|x64.ActiveCfg = Unknowncheats|x64
{B87AB66D-73CC-48A1-9D3A-76B2ECBD3A64}.Unknowncheats|x64.Build.0 = Unknowncheats|x64
{B87AB66D-73CC-48A1-9D3A-76B2ECBD3A64}.Unknowncheats|x86.ActiveCfg = Unknowncheats|Win32
{B87AB66D-73CC-48A1-9D3A-76B2ECBD3A64}.Unknowncheats|x86.Build.0 = Unknowncheats|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+7 -5
View File
@@ -2,6 +2,7 @@
namespace updater {
#ifndef _UC
bool check_and_update(bool automatic_update) {
json commit;
if (!get_last_commit_date(commit)) {
@@ -75,11 +76,6 @@ namespace updater {
return false;
}
bool file_good(const std::string& name) {
std::ifstream f(name.c_str());
return f.good();
}
bool get_last_commit_date(json& commit) {
HINTERNET hInternet, hConnect;
@@ -164,6 +160,12 @@ namespace updater {
return true;
}
#endif
bool file_good(const std::string& name) {
std::ifstream f(name.c_str());
return f.good();
}
bool read() {
if (!updater::file_good(file_path)) {
+7 -5
View File
@@ -17,9 +17,11 @@ namespace fs = std::filesystem;
namespace updater {
const std::string file_path = "offsets.json";
#ifndef _UC
bool check_and_update(bool prompt_update);
bool get_last_commit_date(json& commit);
bool download_file(const char* url, const char* localPath);
#endif
bool file_good(const std::string& name);
extern bool read();
@@ -29,14 +31,14 @@ namespace updater {
inline std::string raw_updated_offets = "https://github.com/IMXNOOBX/cs2-external-esp/raw/main/offsets/offsets.json";
namespace offsets {
inline std::ptrdiff_t dwLocalPlayer = 0x187AC28;
inline std::ptrdiff_t dwEntityList = 0x178D8C8;
inline std::ptrdiff_t dwViewMatrix = 0x187B710;
inline std::ptrdiff_t dwLocalPlayer = 0x187AC48;
inline std::ptrdiff_t dwEntityList = 0x178D8E8;
inline std::ptrdiff_t dwViewMatrix = 0x187B730;
inline std::ptrdiff_t dwPawnHealth = 0x808;
inline std::ptrdiff_t dwPlayerPawn = 0x7FC;
inline std::ptrdiff_t dwSanitizedName = 0x720;
inline std::ptrdiff_t m_iTeamNum = 0x3bf;
inline std::ptrdiff_t m_vecOrigin = 0x1204;
inline std::ptrdiff_t m_iTeamNum = 0x3BF;
inline std::ptrdiff_t m_vecOrigin = 0x1214;
}
}
+8
View File
@@ -75,7 +75,9 @@ int main() {
else
std::cout << "[updater] Error reading config file, reseting to the default state\n" << std::endl;
#ifndef _UC
updater::check_and_update(config::automatic_update);
#endif
std::cout << "[cs2] Waiting for cs2.exe..." << std::endl;
@@ -134,7 +136,11 @@ int main() {
ShowWindow(hWnd, TRUE);
//SetActiveWindow(hack::process->hwnd_);
#ifndef _UC
std::cout << "\n[settings] In Game keybinds:\n\t[F5] enable/disable Team ESP\n\t[F6] enable/disable automatic updates\n\t[fin] Unload esp.\n" << std::endl;
#else
std::cout << "\n[settings] In Game keybinds:\n\t[F5] enable/disable Team ESP\n\t[fin] Unload esp\n" << std::endl;
#endif
// Message loop
MSG msg;
@@ -143,7 +149,9 @@ int main() {
if (GetAsyncKeyState(VK_END) & 0x8000) break;
if (GetAsyncKeyState(VK_F5) & 0x8000) { config::team_esp = !config::team_esp; config::save(); Beep(700, 100); };
#ifndef _UC
if (GetAsyncKeyState(VK_F6) & 0x8000) { config::automatic_update = !config::automatic_update; config::save(); Beep(700, 100); }
#endif
TranslateMessage(&msg);
DispatchMessage(&msg);
+67
View File
@@ -17,6 +17,14 @@
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Unknowncheats|Win32">
<Configuration>Unknowncheats</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Unknowncheats|x64">
<Configuration>Unknowncheats</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
@@ -40,6 +48,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unknowncheats|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
@@ -53,6 +68,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unknowncheats|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@@ -64,16 +86,25 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Unknowncheats|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Unknowncheats|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<TargetName>$(ProjectName)-gdi</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Unknowncheats|x64'">
<TargetName>$(ProjectName)</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
@@ -105,6 +136,24 @@
<AdditionalDependencies>gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Unknowncheats|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>gdiplus.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
@@ -137,6 +186,24 @@
<AdditionalDependencies>gdiplus.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Unknowncheats|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_UC;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>gdiplus.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="classes\auto_updater.cpp" />
<ClCompile Include="classes\config.cpp" />