Skip to content

Commit

Permalink
Upcoming Patch For IOS Client Activation
Browse files Browse the repository at this point in the history
  • Loading branch information
krxdev-kaan committed Jun 28, 2020
1 parent 9b299f6 commit 47f560a
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 18 deletions.
44 changes: 42 additions & 2 deletions WindowsClient/AqHaxCSGO/Forms/EntryForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion WindowsClient/AqHaxCSGO/Forms/EntryForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ private void initButton_Click(object sender, EventArgs e)
if ((Process.GetProcessesByName("csgo").Length > 0))
{
this.Visible = false;
new MainForm().Show();
if (iosSelector.Checked)
{
new TCPForm().Show();
}
else
{
new MainForm().Show();
}
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions WindowsClient/AqHaxCSGO/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,11 @@ private void knifeSelectionBox_SelectedIndexChanged(object sender, EventArgs e)
if (knifeSelectionBox.SelectedItem != null) Globals.SelectedKnife = (string)knifeSelectionBox.SelectedItem;
else Globals.SelectedKnife = "Bayonet";
}

private void materialCheckBox1_CheckedChanged(object sender, EventArgs e)
{
Globals.KnifeChangerAnimFixEnabled = !Globals.KnifeChangerAnimFixEnabled;
}
#endregion

#region Some Shit For Loading State
Expand All @@ -698,10 +703,5 @@ private void knifeSelectionBox_SelectedIndexChanged(object sender, EventArgs e)
[DllImport("kernel32.dll")]
static extern bool FreeConsole();
#endregion

private void materialCheckBox1_CheckedChanged(object sender, EventArgs e)
{
Globals.KnifeChangerAnimFixEnabled = !Globals.KnifeChangerAnimFixEnabled;
}
}
}
77 changes: 69 additions & 8 deletions WindowsClient/AqHaxCSGO/Forms/TCPForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,94 @@
using System.Threading.Tasks;
using System.Threading;
using System.Windows.Forms;
using System.Timers;
using System.Runtime.InteropServices;
using AqHaxCSGO.MemoryManagers;
using MaterialSkin;
using MaterialSkin.Controls;
using AqHaxCSGO.Objects;
using static AqHaxCSGO.Objects.Globals;
using System.Diagnostics;

namespace AqHaxCSGO
{
public partial class TCPForm : MaterialForm
{
System.Timers.Timer timer = new System.Timers.Timer();

public TCPForm()
{
InitializeComponent();
AllocConsole();

if (!Memory.Init())
{
timer.Stop();
timer.Dispose();
timer = null;
if (Program.entryForm.InvokeRequired)
{
Program.entryForm.BeginInvoke((MethodInvoker)delegate ()
{
Program.entryForm.Visible = true;
});
}
this.Close();
}
else
{
var materialSkinManager = MaterialSkinManager.Instance;
materialSkinManager.AddFormToManage(this);
materialSkinManager.Theme = MaterialSkinManager.Themes.DARK;
materialSkinManager.ColorScheme = new ColorScheme(Primary.Green600, Primary.Green900, Primary.Green600, Accent.Green200, TextShade.WHITE);
}

this.FormClosing += new FormClosingEventHandler(AppEx);

timer.Elapsed += new ElapsedEventHandler(UpdateHandle);
timer.Interval = 90000;
timer.Start();
}

private void AppEx(object sender, FormClosingEventArgs e)
{
Environment.Exit(1);
}

private void UpdateHandle(object source, ElapsedEventArgs e)
{
if (!(Process.GetProcessesByName("csgo").Length > 0))
{
timer.Stop();
timer.Dispose();
timer = null;
if (this.InvokeRequired)
{
this.BeginInvoke((MethodInvoker)delegate ()
{
this.Hide();
Program.entryForm.Visible = true;
this.Close();
var materialSkinManager = MaterialSkinManager.Instance;
materialSkinManager.AddFormToManage(this);
materialSkinManager.Theme = MaterialSkinManager.Themes.DARK;
materialSkinManager.ColorScheme = new ColorScheme(Primary.Red600, Primary.Red900, Primary.Red600, Accent.Red200, TextShade.WHITE);
});
}
}
}

private void TCPForm_Load(object sender, EventArgs e)
{
materialLabel2.Text = LocalIPAddress()?.ToString();
Thread th = new Thread(ExecuteServer);
th.Start();
OffsetManager.DownloadOffsets();

NetvarManager.LoadOffsets();
OffsetManager.ScanOffsets();
Threads.InitAll();
FreeConsole();
NetvarManager.netvarList.Clear();
}

private static IPAddress LocalIPAddress()
Expand Down Expand Up @@ -66,9 +126,7 @@ public void ExecuteServer()
listener.Bind(localEndPoint);
listener.Listen(10);

Console.WriteLine("Waiting connection ... ");
Socket clientSocket = listener.Accept();
Console.WriteLine("Connected.");

while (true)
{
Expand All @@ -86,8 +144,6 @@ public void ExecuteServer()
if (data != null) break;
}

Console.WriteLine(data);

if (data == "Merhabalar AQ")
{
SetTextOfLabel("CONNECTED", Color.Green);
Expand Down Expand Up @@ -176,8 +232,6 @@ public void ExecuteServer()
AntiFlashEnabled = false;
}
}

Console.WriteLine("Text received -> {0} ", data);
}

clientSocket.Shutdown(SocketShutdown.Both);
Expand All @@ -186,7 +240,7 @@ public void ExecuteServer()

catch (Exception e)
{
Console.WriteLine(e.ToString());
MessageBox.Show(e.Message);
}
}

Expand Down Expand Up @@ -236,5 +290,12 @@ private void Button1_Click(object sender, EventArgs e)
SetOfLabel("CSGO Offline", Color.Red);
}
}

#region Some Shit For Loading State
[DllImport("kernel32.dll")]
static extern bool AllocConsole();
[DllImport("kernel32.dll")]
static extern bool FreeConsole();
#endregion
}
}
4 changes: 2 additions & 2 deletions WindowsClient/AqHaxCSGO/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("c72f644c-03dc-4323-a253-eb1ad4e924ff")]
[assembly: AssemblyVersion("2.0.1.0")]
[assembly: AssemblyFileVersion("2.0.1.0")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]

0 comments on commit 47f560a

Please sign in to comment.