Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

Commit

Permalink
Add project files.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnamed434 committed Mar 31, 2021
1 parent 4fd02e6 commit 8f3aaff
Show file tree
Hide file tree
Showing 32 changed files with 1,682 additions and 0 deletions.
25 changes: 25 additions & 0 deletions CGWH.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30907.101
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CGWH", "CGWH\CGWH.csproj", "{5CFF0A6D-75FC-4484-B964-24A57F4D4CC0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5CFF0A6D-75FC-4484-B964-24A57F4D4CC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5CFF0A6D-75FC-4484-B964-24A57F4D4CC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CFF0A6D-75FC-4484-B964-24A57F4D4CC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5CFF0A6D-75FC-4484-B964-24A57F4D4CC0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9C71AB5E-6EB9-4D31-A6E6-AC5875271E22}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions CGWH/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
136 changes: 136 additions & 0 deletions CGWH/CGWH.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5CFF0A6D-75FC-4484-B964-24A57F4D4CC0}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>CGWH</RootNamespace>
<AssemblyName>CGWH</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="ControlzEx, Version=4.0.0.0, Culture=neutral, PublicKeyToken=69f1c32f803d307e, processorArchitecture=MSIL">
<HintPath>..\packages\ControlzEx.4.4.0\lib\net462\ControlzEx.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Memory">
<HintPath>..\libs\Memory.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.19\lib\net45\Microsoft.Xaml.Behaviors.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Core\Attributes\VAC.cs" />
<Compile Include="Core\Cheat.cs" />
<Compile Include="Core\Features\AntiFlash.cs" />
<Compile Include="Core\Features\AutoBunnyhop.cs" />
<Compile Include="Core\Features\ESP.cs" />
<Compile Include="Core\Features\FovChanger.cs" />
<Compile Include="Core\Features\ThirdPerson.cs" />
<Compile Include="Core\Features\Trigger.cs" />
<Compile Include="Core\Handlers\ApplicationHandler.cs" />
<Compile Include="Core\Handlers\InitializeHandler.cs" />
<Compile Include="Core\Handlers\KeyboardHandler.cs" />
<Compile Include="Core\Handlers\MouseHandler.cs" />
<Compile Include="Core\Information.cs" />
<Compile Include="Core\Input\GlobalKeyboardHookEventArgs.cs" />
<Compile Include="Core\CrosshairParameters.cs" />
<Compile Include="Core\Player.cs" />
<Compile Include="Core\Offsets.cs" />
<Compile Include="Core\Utilities\Debug.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
7 changes: 7 additions & 0 deletions CGWH/Core/Attributes/VAC.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using System;

namespace CGWH.Core.Attributes
{
[AttributeUsage(AttributeTargets.Class)]
internal class VAC : Attribute { }
}
76 changes: 76 additions & 0 deletions CGWH/Core/Cheat.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
using Microsoft.Win32;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;

namespace CGWH.Core
{
internal class Cheat
{
internal static Memory Memory;

internal static int ModuleAddress;



internal static bool TryFindProcess()
{
try
{
Process[] processes = Process.GetProcesses();
Process process = null;

for (int i = 0; i < processes.Length; i++)
{
if (processes[i].ProcessName == Information.PROCESS_NAME)
{
process = processes[i];
break;
}
}

Utilities.Debug.Log(">> TryFindProcess()");
Utilities.Debug.Log($"[DEBUG:1] {(process?.ProcessName ?? "NULL")} P: ({string.Join(" , ", processes.Select(p => p.ProcessName))})");
if (process != null)
{
Memory = new Memory(Information.PROCESS_NAME);
string[] array = new string[process.Modules.Count];
for (int i = 0; i < process.Modules.Count; i++)
{
array[i] = string.Format("{0}:{1}", process.Modules[i].ModuleName, process.Modules[i].FileName);
if (process.Modules[i].ModuleName == Information.MODULE_DLL_NAME)
{
ModuleAddress = (int)process.Modules[i].BaseAddress;
return true;
}
}
Utilities.Debug.Log($"[DEBUG:2] {string.Join(" , ", array)}");
}
}
catch { }
return false;
}



internal static bool TryCheckValidVersion()
{
string steamPath = Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Valve\\Steam", "InstallPath", null).ToString();

string infPath = steamPath + "\\steamapps\\common\\Counter-Strike Global Offensive\\csgo\\steam.inf";

Utilities.Debug.Log(">> IsGetProcess()");
Utilities.Debug.Log($"[DEBUG:1] {infPath}");

if (File.Exists(infPath))
{
string infText = File.ReadAllText(infPath);
if (infText.Contains(string.Concat(Information.VERSION_DATE_TITLE, Information.VERSION_DATE)) && infText.Contains(string.Concat(Information.VERSION_TIME_TITLE, Information.VERSION_TIME)))
return true;
}

return false;
}
}
}
24 changes: 24 additions & 0 deletions CGWH/Core/CrosshairParameters.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace CGWH.Core.Other
{
internal class CrosshairParameters
{
internal int TriggerEnemy { get; }

internal int TriggerEnemyTeam { get; }

internal int TriggerValue { get; }



internal CrosshairParameters(int triggerEnemy, int enemyTeam, int triggerValue)
{
TriggerEnemy = triggerEnemy;
TriggerEnemyTeam = enemyTeam;
TriggerValue = triggerValue;
}



internal bool TriggerIsTeammate() => Player.TeamNum == TriggerEnemyTeam;
}
}
31 changes: 31 additions & 0 deletions CGWH/Core/Features/AntiFlash.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using CGWH.Core.Handlers;
using System.Windows.Forms;
using static CGWH.Core.Input.GlobalKeyboardHook;

namespace CGWH.Core.Functions
{
internal class AntiFlash : InitializeHandler
{
private bool enabled = false;



protected override void OnEnable() => Main.Instance.Hook.KeyboardPressed += onKeyPress;



protected override void OnDisable() => Main.Instance.Hook.KeyboardPressed -= onKeyPress;



private void onKeyPress(object sender, Input.GlobalKeyboardHookEventArgs e)
{
if (e.KeyboardData.Key == Keys.J && e.KeyboardState == KeyboardState.KeyDown)
{
if (enabled = !enabled) Player.SetFlashAlpha(.0f);

else Player.SetFlashAlphaByDefault();
}
}
}
}
57 changes: 57 additions & 0 deletions CGWH/Core/Features/AutoBunnyhop.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using CGWH.Core.Handlers;
using System.Threading;
using System.Windows.Forms;
using static CGWH.Core.Input.GlobalKeyboardHook;

namespace CGWH.Core.Functions
{
internal class AutoBunnyhop : InitializeHandler
{
private bool enabled = false;



protected override void OnEnable()
{
Main.Instance.Hook.KeyboardPressed += onKeyPress;



enable();
}



protected override void OnDisable() => Main.Instance.Hook.KeyboardPressed -= onKeyPress;



internal void enable()
{
Thread thread = new Thread(t =>
{
while (true)
{
if (enabled)
{
if (KeyboardHandler.GetKeyDown(Keys.Space) && Player.IsGround)
{
Player.Jump(5);
}
}

Thread.Sleep(1);
}
});

thread.Start();
}



private void onKeyPress(object sender, Input.GlobalKeyboardHookEventArgs e)
{
if (e.KeyboardState == KeyboardState.KeyDown && e.KeyboardData.Key == Keys.C) enabled = !enabled;
}
}
}
Loading

0 comments on commit 8f3aaff

Please sign in to comment.