diff --git a/AuroraLauncher/AuroraLauncher.csproj b/AuroraLauncher/AuroraLauncher.csproj
index c2a1d07..559d739 100644
--- a/AuroraLauncher/AuroraLauncher.csproj
+++ b/AuroraLauncher/AuroraLauncher.csproj
@@ -6,7 +6,7 @@
Debug
x64
{C6D5E15A-5A85-4F00-BECF-854A4A54B1EC}
- WinExe
+ Exe
AuroraLauncher
FortniteLauncher
v4.5.2
@@ -22,7 +22,7 @@
full
false
bin\Debug\
- TRACE;DEBUG;NATIVE NO_EGL GUI ONLINE
+ TRACE;DEBUG;NATIVE ONLINE
prompt
4
true
@@ -33,7 +33,7 @@
pdbonly
true
bin\Release\
- TRACE;NATIVE NO_EGL GUI ONLINE
+ TRACE;NATIVE ONLINE FAKE_API
prompt
4
true
@@ -52,6 +52,12 @@
AuroraMin.ico
+
+ ..\packages\Portable.BouncyCastle.1.8.5.2\lib\net40\BouncyCastle.Crypto.dll
+
+
+ ..\packages\BrotliSharpLib.0.3.3\lib\net451\BrotliSharpLib.dll
+
..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll
@@ -65,19 +71,28 @@
..\packages\RestSharp.106.11.4\lib\net452\RestSharp.dll
+
+ ..\packages\System.Buffers.4.5.0\lib\netstandard1.1\System.Buffers.dll
+
+
+ ..\packages\System.Memory.4.5.3\lib\netstandard1.1\System.Memory.dll
+
+
+ ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll
+
+
+ ..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll
+
+
+ ..\packages\Titanium.Web.Proxy.3.1.1301\lib\net45\Titanium.Web.Proxy.dll
+
-
- Form
-
-
- OldGui.cs
-
True
True
@@ -110,9 +125,6 @@
Gui.cs
-
- OldGui.cs
-
ResXFileCodeGenerator
Resources.Designer.cs
@@ -125,11 +137,6 @@
-
-
- PreserveNewest
-
-
diff --git a/AuroraLauncher/Build.cs b/AuroraLauncher/Build.cs
index 2f2f199..3a66a82 100644
--- a/AuroraLauncher/Build.cs
+++ b/AuroraLauncher/Build.cs
@@ -3,11 +3,7 @@
internal class Build
{
internal const string ClientExecutable = "FortniteClient-Win64-Shipping.exe";
-#if !NO_EGL
- internal const string ClientArguments = "";
-#else
internal const string ClientArguments = "-epicapp=Fortnite -epicenv=Prod -epiclocale=en-us -epicportal";
-#endif
internal const string LauncherNative = "AuroraNative.dll";
internal const string LauncherUri = "https://aurorafn.dev";
diff --git a/AuroraLauncher/GUI.cs b/AuroraLauncher/GUI.cs
index 23304b6..683115d 100644
--- a/AuroraLauncher/GUI.cs
+++ b/AuroraLauncher/GUI.cs
@@ -4,49 +4,71 @@
using System;
using System.Diagnostics;
using System.IO;
+using System.Net;
using System.Net.Mail;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading;
+using System.Threading.Tasks;
using System.Windows.Forms;
+using Titanium.Web.Proxy;
+using Titanium.Web.Proxy.EventArguments;
+using Titanium.Web.Proxy.Http;
+using Titanium.Web.Proxy.Models;
namespace AuroraLauncher
{
partial class Gui : MaterialForm
{
- MaterialSkinManager _skinManager;
+ #region Field Region
- public Configuration Configuration;
+ MaterialSkinManager _skinManager;
Settings _settings;
+ ProxyServer _proxy;
+
Thread _commonHeartbeat;
Thread _onlineHeartbeat;
bool _onlinePaused;
-
bool _showedUpdate;
Process _clientProcess;
///
/// 0 = None, 1 = BattlEye, 2 = EasyAntiCheat
///
- int _clientAnticheat = 2; // Forced to EAC, until added into Settings.
+ int _clientAnticheat = 1; // Forced to BE, until added into Settings.
+
+ #endregion
+
+ #region Property Region
+
+ public Configuration Configuration { get; private set; }
+
+ #endregion
+
+ #region Constructor Region
public Gui()
{
InitializeComponent();
+ Text += $" [{App.Version}]";
+
_skinManager = MaterialSkinManager.Instance;
_skinManager.AddFormToManage(this);
Configuration = new Configuration();
Configuration.Open();
- // Settings form manages SkinManager
_settings = new Settings(this);
- Text += $" [{App.Version}]";
+ _proxy = new ProxyServer();
+ _proxy.BeforeRequest += OnBeforeRequest;
+
+ _proxy.AddEndPoint(new ExplicitProxyEndPoint(IPAddress.Any, 6000, true));
+ _proxy.Start();
materialSingleLineTextFieldEmail.Text = Configuration.Email;
materialSingleLineTextFieldPassword.Text = Configuration.Password;
@@ -71,6 +93,24 @@ public Gui()
#endif
}
+ #endregion
+
+ #region Method Region
+
+ public async Task OnBeforeRequest(object sender, SessionEventArgs e)
+ {
+ Console.WriteLine(e.HttpClient.Request.Url);
+
+ if (e.HttpClient.Request.Url.Contains(".epicgames.com"))
+ {
+ var builder = new UriBuilder(e.HttpClient.Request.Url);
+
+ builder.Host = "aurorafn.dev";
+
+ e.HttpClient.Request.Url = builder.Uri.ToString();
+ }
+ }
+
delegate void SetOnlineTextDelegate(string text);
void SetOnlineText(string text)
@@ -128,7 +168,7 @@ void CommonHeartbeat()
SetHide();
}
else
- _clientProcess = null; // TODO: Probably a dumb hack?
+ _clientProcess = null; // TODO (Cyuubi): Probably a dumb hack?
}
else
{
@@ -202,20 +242,10 @@ private void materialRaisedButtonPasswordView_Click(object sender, EventArgs e)
materialRaisedButtonPasswordView.Text = "Hide";
}
- void DiscordClick()
- {
- Process.Start("https://discord.gg/AuroraFN");
- }
+ void DiscordClick() => Process.Start("https://discord.gg/AuroraFN");
- private void pictureBoxDiscord_Click(object sender, EventArgs e)
- {
- DiscordClick();
- }
-
- private void materialFlatButtonDiscord_Click(object sender, EventArgs e)
- {
- DiscordClick();
- }
+ private void pictureBoxDiscord_Click(object sender, EventArgs e) => DiscordClick();
+ private void materialFlatButtonDiscord_Click(object sender, EventArgs e) => DiscordClick();
public static bool IsValidPath(string path)
{
@@ -288,7 +318,7 @@ private void materialRaisedButtonLaunch_Click(object sender, EventArgs e)
return;
}
- // TODO: Fix this?
+ // TODO (Cyuubi): Fix this?
if (materialSingleLineTextFieldPassword.Text.Contains(" "))
{
MessageBox.Show("Invalid Password, are you sure it's correct?", string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error);
@@ -334,14 +364,14 @@ private void materialRaisedButtonLaunch_Click(object sender, EventArgs e)
return;
}
- var arguments = $"-AUTH_LOGIN={Configuration.Email} -AUTH_PASSWORD={Configuration.Password} -AUTH_TYPE=epic " + Configuration.Arguments;
+ var arguments = $"-AUTH_LOGIN={Configuration.Email} -AUTH_PASSWORD={Configuration.Password} -AUTH_TYPE=epic {Build.ClientArguments} {Configuration.Arguments}";
if (_clientAnticheat == 0) // None
- arguments += $" {Build.ClientArguments} -noeac -nobe -fltoken=none";
+ arguments += $" -noeac -nobe -fltoken=none";
else if (_clientAnticheat == 1) // BattlEye
- arguments += $" {Build.ClientArguments} -noeac -fromfl=be -fltoken={Build.BeToken}";
+ arguments += $" -noeac -fromfl=be -fltoken={Build.BeToken}";
else if (_clientAnticheat == 2) // EasyAntiCheat
- arguments += $" {Build.ClientArguments} -nobe -fromfl=eac -fltoken={Build.EacToken}";
+ arguments += $" -nobe -fromfl=eac -fltoken={Build.EacToken}";
_clientProcess = new Process
{
@@ -373,7 +403,7 @@ private void materialRaisedButtonLaunch_Click(object sender, EventArgs e)
reader.Start();
#else
- Helper.InjectDll(_clientProcess.Id, Build.LauncherNative);
+ Helper.InjectDll(_clientProcess.Id, nativePath);
#endif // NATIVE
}
@@ -397,5 +427,7 @@ private void materialFlatButtonSettings_Click(object sender, EventArgs e)
_settings.Location = Location;
_settings.ShowDialog();
}
+
+ #endregion
}
}
diff --git a/AuroraLauncher/LIBRARIES.txt b/AuroraLauncher/LIBRARIES.txt
deleted file mode 100644
index 84b2790..0000000
--- a/AuroraLauncher/LIBRARIES.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-AuroraLauncher uses the following libraries:
-- MaterialSkin
-- Newtonsoft.Json
-- RestSharp
-
-AuroraNative uses the following libraries:
-- CxxUrl
diff --git a/AuroraLauncher/OldGUI.cs b/AuroraLauncher/OldGUI.cs
deleted file mode 100644
index 1132f8d..0000000
--- a/AuroraLauncher/OldGUI.cs
+++ /dev/null
@@ -1,148 +0,0 @@
-using AuroraLauncher.Providers;
-using System;
-using System.Diagnostics;
-using System.IO;
-using System.Reflection;
-using System.Text.RegularExpressions;
-using System.Windows.Forms;
-
-namespace AuroraLauncher
-{
- public partial class OldGui : Form
- {
- static Process _clientProcess;
- ///
- /// 0 = None, 1 = BattlEye, 2 = EasyAntiCheat
- ///
- static byte _clientAnticheat = 2; // Forced to EAC.
-
- public OldGui()
- {
- InitializeComponent();
-
- foreach (EpicGames.Installed.Installation installation
- in EpicGames.LauncherInstalled.InstallationList)
- {
- if (installation.AppName == "Fortnite")
- textBoxFortnitePath.Text = installation.InstallLocation;
- }
- }
-
- private void OldGui_FormClosing(object sender, FormClosingEventArgs e)
- {
- if (_clientProcess != null)
- {
- if (!_clientProcess.HasExited)
- {
- MessageBox.Show("You cannot close Aurora Launcher while Fortnite is running!", string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Information);
-
- e.Cancel = true;
- }
- }
- }
-
- private void buttonBrowse_Click(object sender, EventArgs e)
- {
- if (folderBrowserDialogBrowse.ShowDialog() == DialogResult.OK)
- textBoxFortnitePath.Text = folderBrowserDialogBrowse.SelectedPath;
- }
-
- private void linkLabelDiscord_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
- {
- Process.Start("https://discord.gg/aurorafn");
- }
-
- private void buttonInfo_Click(object sender, EventArgs e)
- {
- var text =
- "Having problems using Aurora? Make sure you follow these guidelines:\n" +
- "- Your Fortnite is up-to-date.\n" +
- "- Your username does not contain special characters.\n\n" +
- "If you still seem to have problems, then please join our Discord server: https://discord.gg/aurorafn";
-
- MessageBox.Show(text);
- }
-
- private void buttonLaunch_Click(object sender, EventArgs e)
- {
- if (string.IsNullOrEmpty(textBoxUsername.Text) || textBoxUsername.Text.Length < 3)
- {
- MessageBox.Show("Username cannot be empty or below 3 characters.", string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
-
- textBoxUsername.Text = Regex.Replace(textBoxUsername.Text, "[^a-zA-Z0-9_.]+", string.Empty, RegexOptions.Compiled);
-
- // Sigh...
- try
- {
- if (!Gui.IsValidPath(textBoxFortnitePath.Text))
- {
- MessageBox.Show("Invalid Fortnite path.", string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
- }
- catch
- {
- MessageBox.Show("Invalid Fortnite path.", string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
-
- var clientPath = Path.Combine(textBoxFortnitePath.Text, $"FortniteGame\\Binaries\\Win64\\{Build.ClientExecutable}");
- if (!File.Exists(clientPath))
- {
- MessageBox.Show($"\"{Build.ClientExecutable}\" was not found, please make sure it exists.", string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
-
- var nativePath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), Build.LauncherNative);
- if (!File.Exists(nativePath))
- {
- MessageBox.Show($"\"{Build.LauncherNative}\" was not found, please make sure it exists.", string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error);
- return;
- }
-
- var formattedArguments = $"-AUTH_LOGIN=\"{textBoxUsername.Text}@unused.com\" -AUTH_PASSWORD=unused -AUTH_TYPE=epic";
-
- if (_clientAnticheat == 0) // None
- formattedArguments += $" {Build.ClientArguments} -noeac -nobe -fltoken=none";
- else if (_clientAnticheat == 1) // BattlEye
- formattedArguments += $" {Build.ClientArguments} -noeac -fromfl=be -fltoken={Build.BeToken}";
- else if (_clientAnticheat == 2) // EasyAntiCheat
- formattedArguments += $" {Build.ClientArguments} -nobe -fromfl=eac -fltoken={Build.EacToken}";
-
- _clientProcess = new Process
- {
- StartInfo = new ProcessStartInfo(clientPath, formattedArguments)
- {
- UseShellExecute = false,
-
- RedirectStandardOutput = true,
-
- CreateNoWindow = false
- }
- };
-
- _clientProcess.Start();
-
-#if !NATIVE
- // Allocate the console, for standard output.
- Win32.AllocConsole();
-
- // Setup an AsyncStreamReader, for standard output.
- var reader = new AsyncStreamReader(_clientProcess.StandardOutput);
-
- reader.ValueRecieved += delegate (object sender, string value)
- {
- Console.ForegroundColor = ConsoleColor.White;
- Console.Write(value);
- Console.ForegroundColor = ConsoleColor.Gray;
- };
-
- reader.Start();
-#else
- Helper.InjectDll(_clientProcess.Id, Build.LauncherNative);
-#endif // NATIVE
- }
- }
-}
diff --git a/AuroraLauncher/OldGUI.designer.cs b/AuroraLauncher/OldGUI.designer.cs
deleted file mode 100644
index d99c56a..0000000
--- a/AuroraLauncher/OldGUI.designer.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-namespace AuroraLauncher
-{
- partial class OldGui
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.buttonLaunch = new System.Windows.Forms.Button();
- this.labelUsername = new System.Windows.Forms.Label();
- this.textBoxUsername = new System.Windows.Forms.TextBox();
- this.labelFortnitePath = new System.Windows.Forms.Label();
- this.textBoxFortnitePath = new System.Windows.Forms.TextBox();
- this.linkLabelDiscord = new System.Windows.Forms.LinkLabel();
- this.buttonBrowse = new System.Windows.Forms.Button();
- this.folderBrowserDialogBrowse = new System.Windows.Forms.FolderBrowserDialog();
- this.buttonInfo = new System.Windows.Forms.Button();
- this.SuspendLayout();
- //
- // buttonLaunch
- //
- this.buttonLaunch.Location = new System.Drawing.Point(262, 79);
- this.buttonLaunch.Name = "buttonLaunch";
- this.buttonLaunch.Size = new System.Drawing.Size(60, 20);
- this.buttonLaunch.TabIndex = 0;
- this.buttonLaunch.Text = "Launch";
- this.buttonLaunch.UseVisualStyleBackColor = true;
- this.buttonLaunch.Click += new System.EventHandler(this.buttonLaunch_Click);
- //
- // labelUsername
- //
- this.labelUsername.AutoSize = true;
- this.labelUsername.Location = new System.Drawing.Point(12, 15);
- this.labelUsername.Name = "labelUsername";
- this.labelUsername.Size = new System.Drawing.Size(58, 13);
- this.labelUsername.TabIndex = 1;
- this.labelUsername.Text = "Username:";
- //
- // textBoxUsername
- //
- this.textBoxUsername.Location = new System.Drawing.Point(77, 12);
- this.textBoxUsername.Name = "textBoxUsername";
- this.textBoxUsername.Size = new System.Drawing.Size(245, 20);
- this.textBoxUsername.TabIndex = 2;
- //
- // labelFortnitePath
- //
- this.labelFortnitePath.AutoSize = true;
- this.labelFortnitePath.Location = new System.Drawing.Point(12, 42);
- this.labelFortnitePath.Name = "labelFortnitePath";
- this.labelFortnitePath.Size = new System.Drawing.Size(70, 13);
- this.labelFortnitePath.TabIndex = 3;
- this.labelFortnitePath.Text = "Fortnite Path:";
- //
- // textBoxFortnitePath
- //
- this.textBoxFortnitePath.Location = new System.Drawing.Point(88, 39);
- this.textBoxFortnitePath.Name = "textBoxFortnitePath";
- this.textBoxFortnitePath.Size = new System.Drawing.Size(203, 20);
- this.textBoxFortnitePath.TabIndex = 4;
- //
- // linkLabelDiscord
- //
- this.linkLabelDiscord.AutoSize = true;
- this.linkLabelDiscord.Location = new System.Drawing.Point(13, 86);
- this.linkLabelDiscord.Name = "linkLabelDiscord";
- this.linkLabelDiscord.Size = new System.Drawing.Size(86, 13);
- this.linkLabelDiscord.TabIndex = 5;
- this.linkLabelDiscord.TabStop = true;
- this.linkLabelDiscord.Text = "Join our Discord.";
- this.linkLabelDiscord.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelDiscord_LinkClicked);
- //
- // buttonBrowse
- //
- this.buttonBrowse.Location = new System.Drawing.Point(297, 39);
- this.buttonBrowse.Name = "buttonBrowse";
- this.buttonBrowse.Size = new System.Drawing.Size(25, 20);
- this.buttonBrowse.TabIndex = 6;
- this.buttonBrowse.Text = "...";
- this.buttonBrowse.UseVisualStyleBackColor = true;
- this.buttonBrowse.Click += new System.EventHandler(this.buttonBrowse_Click);
- //
- // buttonInfo
- //
- this.buttonInfo.Location = new System.Drawing.Point(224, 79);
- this.buttonInfo.Name = "buttonInfo";
- this.buttonInfo.Size = new System.Drawing.Size(35, 20);
- this.buttonInfo.TabIndex = 7;
- this.buttonInfo.Text = "Info";
- this.buttonInfo.UseVisualStyleBackColor = true;
- this.buttonInfo.Click += new System.EventHandler(this.buttonInfo_Click);
- //
- // OldGUI
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(334, 111);
- this.Controls.Add(this.buttonInfo);
- this.Controls.Add(this.buttonBrowse);
- this.Controls.Add(this.linkLabelDiscord);
- this.Controls.Add(this.textBoxFortnitePath);
- this.Controls.Add(this.labelFortnitePath);
- this.Controls.Add(this.textBoxUsername);
- this.Controls.Add(this.labelUsername);
- this.Controls.Add(this.buttonLaunch);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
- this.MaximizeBox = false;
- this.Name = "OldGUI";
- this.Text = "Aurora Launcher";
- this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OldGui_FormClosing);
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.Button buttonLaunch;
- private System.Windows.Forms.Label labelUsername;
- private System.Windows.Forms.TextBox textBoxUsername;
- private System.Windows.Forms.Label labelFortnitePath;
- private System.Windows.Forms.TextBox textBoxFortnitePath;
- private System.Windows.Forms.LinkLabel linkLabelDiscord;
- private System.Windows.Forms.Button buttonBrowse;
- private System.Windows.Forms.FolderBrowserDialog folderBrowserDialogBrowse;
- private System.Windows.Forms.Button buttonInfo;
- }
-}
\ No newline at end of file
diff --git a/AuroraLauncher/OldGui.resx b/AuroraLauncher/OldGui.resx
deleted file mode 100644
index fab6828..0000000
--- a/AuroraLauncher/OldGui.resx
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- 17, 17
-
-
\ No newline at end of file
diff --git a/AuroraLauncher/Program.cs b/AuroraLauncher/Program.cs
index b5d5814..bd39b02 100644
--- a/AuroraLauncher/Program.cs
+++ b/AuroraLauncher/Program.cs
@@ -1,7 +1,4 @@
using System;
-using System.Diagnostics;
-using System.IO;
-using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace AuroraLauncher
@@ -10,175 +7,22 @@ class Program
{
#region Field Region
- static Process _clientProcess;
- ///
- /// 0 = None, 1 = BattlEye, 2 = EasyAntiCheat
- ///
- static byte _clientAnticheat;
+ static Gui _gui;
#endregion
#region Method Region
-#if GUI
[STAThread]
-#endif // GUI
static void Main(string[] args)
{
- var formattedArguments = string.Join(" ", args);
-
-#if GUI
Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
-
- // Check if -NOSTALGIA exists in args (regardless of case) to run the old GUI.
- if (!formattedArguments.ToUpper().Contains("-NOSTALGIA"))
- Application.Run(new Gui());
- else
- Application.Run(new OldGui());
-#else
- // Check if -FORCEBE exists in args (regardless of case) to force BattlEye.
- if (formattedArguments.ToUpper().Contains("-FORCEBE"))
- {
- formattedArguments = Regex.Replace(formattedArguments, "-FORCEBE", string.Empty, RegexOptions.IgnoreCase);
-
- _clientAnticheat = 1;
- }
-
- // Check if -FORCEEAC exists in args (regardless of case) to force EasyAntiCheat.
- if (formattedArguments.ToUpper().Contains("-FORCEEAC"))
- {
- formattedArguments = Regex.Replace(formattedArguments, "-FORCEEAC", string.Empty, RegexOptions.IgnoreCase);
-
- _clientAnticheat = 2;
- }
-
- if (_clientAnticheat == 0) // None
- formattedArguments += $" {Build.ClientArguments} -noeac -nobe -fltoken=none";
- else if (_clientAnticheat == 1) // BattlEye
- formattedArguments += $" {Build.ClientArguments} -noeac -fromfl=be -fltoken={Build.BeToken}";
- else if (_clientAnticheat == 2) // EasyAntiCheat
- formattedArguments += $" {Build.ClientArguments} -nobe -fromfl=eac -fltoken={Build.EacToken}";
-
-#if !NATIVE
- Win32.AllocConsole();
-#endif // NATIVE
-
- // Check if the client exists in the current work path, if it doesn't, just exit.
- if (!File.Exists(Build.ClientExecutable))
- {
-#if NATIVE
- Win32.AllocConsole();
-#endif // NATIVE
-
- Console.ForegroundColor = ConsoleColor.Red;
- Console.WriteLine($"\"{Build.ClientExecutable}\" was not found, please make sure it exists.");
- Console.ForegroundColor = ConsoleColor.Gray;
- Console.ReadKey();
-
- return;
- }
-
-#if NATIVE
- // Check if the native exists in the current work path, if it doesn't, just exit.
- if (!File.Exists(Build.ClientNative))
- {
- Win32.AllocConsole();
-
- Console.ForegroundColor = ConsoleColor.Red;
- Console.WriteLine($"\"{Build.ClientNative}\" was not found, please make sure it exists.");
- Console.ForegroundColor = ConsoleColor.Gray;
- Console.ReadKey();
-
- return;
- }
-#endif // NATIVE
-
-#if !NATIVE
- Console.ForegroundColor = ConsoleColor.Magenta;
- Console.WriteLine("Aurora, made with <3 by Cyuubi and Slushia.");
- Console.WriteLine("Discord: https://discord.gg/aurorafn\n");
- Console.ForegroundColor = ConsoleColor.Gray;
-#endif // NATIVE
-
- _clientProcess = new Process
- {
- StartInfo = new ProcessStartInfo(Build.ClientExecutable, formattedArguments)
- {
- UseShellExecute = false,
-
- RedirectStandardOutput = true,
-
- CreateNoWindow = false
- }
- };
-#if !NO_EGL
- Swap(); // Swap the launcher, to prevent Fortnite from detecting it.
-#endif // NO_EGL
-
- _clientProcess.Start();
-
-#if !NATIVE
- // Setup a HandlerRoutine, for detecting when the console closes.
- Win32.SetConsoleCtrlHandler(new Win32.HandlerRoutine(Routine), true);
-
- // Setup an AsyncStreamReader, for standard output.
- var reader = new AsyncStreamReader(_clientProcess.StandardOutput);
-
- reader.ValueRecieved += delegate (object sender, string value)
- {
- Console.ForegroundColor = ConsoleColor.White;
- Console.Write(value);
- Console.ForegroundColor = ConsoleColor.Gray;
- };
-
- reader.Start();
-#else
- Helper.InjectDll(_clientProcess.Id, Build.ClientNative);
-#endif // NATIVE
-
- _clientProcess.WaitForExit(); // Wait for the client process to exit.
-
-#if !NO_EGL
- Swap(); // Before exiting... Swap the launcher, again.
-#endif // NO_EGL
-#endif // GUI
- }
-
- static void Swap()
- {
- // Custom -> Original
- if (File.Exists("FortniteLauncher.exe.original"))
- {
- File.Move("FortniteLauncher.exe", "FortniteLauncher.exe.custom");
- File.Move("FortniteLauncher.exe.original", "FortniteLauncher.exe");
- }
-
- // Original -> Custom
- if (File.Exists("FortniteLauncher.exe.custom"))
- {
- File.Move("FortniteLauncher.exe", "FortniteLauncher.exe.original");
- File.Move("FortniteLauncher.exe.custom", "FortniteLauncher.exe");
- }
- }
-
- static bool Routine(int dwCtrlType)
- {
- switch (dwCtrlType)
- {
- case 2:
- {
- if (!_clientProcess.HasExited)
- _clientProcess.Kill();
-
- break;
- }
- }
+ Application.SetCompatibleTextRenderingDefault(false);
- return false;
+ Application.Run(_gui = new Gui());
}
-#endregion
+ #endregion
}
}
diff --git a/AuroraLauncher/Providers/Configuration.cs b/AuroraLauncher/Providers/Configuration.cs
index c535627..fed47d4 100644
--- a/AuroraLauncher/Providers/Configuration.cs
+++ b/AuroraLauncher/Providers/Configuration.cs
@@ -14,9 +14,8 @@ class Configuration
#region Property Region
- [JsonProperty("InstallLocation")] //required because fucking confuserex
+ [JsonProperty("InstallLocation")]
public string InstallLocation { get; set; }
-
[JsonProperty("Arguments")]
public string Arguments { get; set; }
@@ -35,7 +34,6 @@ class Configuration
#region Method Region
- // TODO: Add configuration file to Build.cs.
public void Open()
{
if (File.Exists(_path))
diff --git a/AuroraLauncher/Providers/EpicGames.cs b/AuroraLauncher/Providers/EpicGames.cs
index 7c7ce3f..bb71a31 100644
--- a/AuroraLauncher/Providers/EpicGames.cs
+++ b/AuroraLauncher/Providers/EpicGames.cs
@@ -42,7 +42,12 @@ static Installed GetLauncherInstalled()
"Epic\\UnrealEngineLauncher\\LauncherInstalled.dat");
if (!File.Exists(path))
- return new Installed();
+ {
+ return new Installed()
+ {
+ InstallationList = new Installed.Installation[0]
+ };
+ }
else
return JsonConvert.DeserializeObject(File.ReadAllText(path));
}
diff --git a/AuroraLauncher/Settings.cs b/AuroraLauncher/Settings.cs
index 6e6c4de..b353a99 100644
--- a/AuroraLauncher/Settings.cs
+++ b/AuroraLauncher/Settings.cs
@@ -8,10 +8,16 @@ namespace AuroraLauncher
{
partial class Settings : MaterialForm
{
+ #region Field Region
+
Gui _gui;
MaterialSkinManager _skinManager;
+ #endregion
+
+ #region Constructor Region
+
public Settings(Gui gui)
{
InitializeComponent();
@@ -34,24 +40,20 @@ public Settings(Gui gui)
materialSingleLineTextFieldArguments.Text = _gui.Configuration.Arguments;
}
+ #endregion
+
+ #region Method Region
+
void Save()
{
_gui.Configuration.InstallLocation = materialSingleLineTextFieldInstallLocation.Text;
-
_gui.Configuration.Arguments = materialSingleLineTextFieldArguments.Text;
_gui.Configuration.Save();
}
- private void Settings_FormClosing(object sender, FormClosingEventArgs e)
- {
- Save();
- }
-
- private void materialRaisedButtonSave_Click(object sender, EventArgs e)
- {
- Save();
- }
+ private void Settings_FormClosing(object sender, FormClosingEventArgs e) => Save();
+ private void materialRaisedButtonSave_Click(object sender, EventArgs e) => Save();
private void materialFlatButtonInstallLocationBrowse_Click(object sender, EventArgs e)
{
@@ -75,5 +77,7 @@ private void materialRadioButtonThemeDark_CheckedChanged(object sender, EventArg
_skinManager.Theme = _gui.Configuration.DarkMode ? MaterialSkinManager.Themes.DARK : MaterialSkinManager.Themes.LIGHT;
}
+
+ #endregion
}
}
diff --git a/AuroraLauncher/app.config b/AuroraLauncher/app.config
index ff99501..0890152 100644
--- a/AuroraLauncher/app.config
+++ b/AuroraLauncher/app.config
@@ -1,3 +1,12 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/AuroraLauncher/packages.config b/AuroraLauncher/packages.config
index 7a6927c..a00c932 100644
--- a/AuroraLauncher/packages.config
+++ b/AuroraLauncher/packages.config
@@ -1,8 +1,15 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/AuroraNative/AuroraNative.vcxproj b/AuroraNative/AuroraNative.vcxproj
index 7a768ad..6687929 100644
--- a/AuroraNative/AuroraNative.vcxproj
+++ b/AuroraNative/AuroraNative.vcxproj
@@ -55,7 +55,7 @@
- Use
+ NotUsing
Level3
true
_DEBUG;AURORANATIVE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
@@ -70,7 +70,7 @@
- Use
+ NotUsing
Level3
true
true
@@ -94,21 +94,12 @@ xcopy "$(TargetPath)" "$(SolutionDir)Build\" /F /I /R /Y
-
-
-
-
+
-
-
- Create
- Create
-
-
diff --git a/AuroraNative/AuroraNative.vcxproj.filters b/AuroraNative/AuroraNative.vcxproj.filters
index 3acbbb2..933294f 100644
--- a/AuroraNative/AuroraNative.vcxproj.filters
+++ b/AuroraNative/AuroraNative.vcxproj.filters
@@ -15,28 +15,16 @@
-
- Header Files
-
-
- Header Files
-
Header Files
-
- Header Files
-
-
- Header Files
-
Header Files
Header Files
-
+
Header Files
@@ -44,12 +32,6 @@
Source Files
-
- Source Files
-
-
- Source Files
-
Source Files
diff --git a/AuroraNative/build.h b/AuroraNative/build.h
index 938971e..7f4e7a2 100644
--- a/AuroraNative/build.h
+++ b/AuroraNative/build.h
@@ -1,9 +1,3 @@
#pragma once
-//#define LOCALHOST // Enables Localhost servers
-#define ONLINE // Enables Online servers
-
-#define DISABLE_PINNING // Disables SSL pinning
-//#define DISABLE_PROXY // Disables proxy
-
//#define VERBOSE // Enables verbose logging
\ No newline at end of file
diff --git a/AuroraNative/curl.h b/AuroraNative/curl.h
new file mode 100644
index 0000000..de67ffd
--- /dev/null
+++ b/AuroraNative/curl.h
@@ -0,0 +1,86 @@
+#ifndef CURL_H
+#define CURL_H
+
+#include
+#include
+
+#include "util.h"
+#include "hook.h"
+
+LPVOID lpCurlSetopt;
+
+LPVOID lpCurlEasySetopt;
+VHook* pCurlEasySetoptHook;
+
+LONG(*CurlSetopt)(LPVOID, INT, va_list) = nullptr;
+LONG CurlSetoptVa(LPVOID lpContext, INT iOption, ...) {
+ va_list pArg;
+
+ LONG lResult;
+
+ va_start(pArg, iOption);
+
+ lResult = CurlSetopt(lpContext, iOption, pArg);
+
+ va_end(pArg);
+
+ return lResult;
+}
+
+LONG CurlEasySetopt(LPVOID lpContext, INT iTag, ...) {
+ va_list pArg;
+
+ LONG lResult;
+
+ if (lpContext == nullptr)
+ return 43; // CURLE_BAD_FUNCTION_ARGUMENT
+
+ va_start(pArg, iTag);
+
+ switch (iTag) {
+ case 64: // CURLOPT_SSL_VERIFYPEER
+ lResult = CurlSetoptVa(lpContext, 10004, "http://127.0.0.1:6000/"); // TODO (Cyuubi): Probably should de-hardcode this, eventually. (aka, never)
+ lResult = CurlSetoptVa(lpContext, 64, false);
+ break;
+
+ default:
+ lResult = CurlSetopt(lpContext, iTag, pArg);
+ break;
+ }
+
+ va_end(pArg);
+
+ return lResult;
+}
+
+VOID InitCurl() {
+ auto pCurlSetoptAddress = Util::FindPattern("\x48\x89\x5C\x24\x08\x48\x89\x6C\x24\x10\x48\x89\x74\x24\x18\x57\x48\x83\xEC\x30\x33\xED\x49\x8B\xF0\x48\x8B\xD9", "xxxxxxxxxxxxxxxxxxxxxxxxxxxx");
+ if (!pCurlSetoptAddress) {
+ MessageBox(NULL, (LPCWSTR)L"Finding pattern for CurlSetopt has failed, please re-open Fortnite and try again!", (LPCWSTR)L"Error", MB_ICONERROR);
+ exit(EXIT_FAILURE);
+ }
+
+#ifdef VERBOSE
+ printf("pCurlSetoptAddress: %" PRIXPTR "\n", pCurlSetoptAddress);
+#endif // VERBOSE
+
+ auto pCurlEasySetoptAddress = Util::FindPattern("\x89\x54\x24\x10\x4C\x89\x44\x24\x18\x4C\x89\x4C\x24\x20\x48\x83\xEC\x28\x48\x85\xC9\x75\x08\x8D\x41\x2B\x48\x83\xC4\x28\xC3\x4C", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
+ if (!pCurlEasySetoptAddress) {
+ MessageBox(NULL, (LPCWSTR)L"Finding pattern for CurlEasySetopt has failed, please re-open Fortnite and try again!", (LPCWSTR)L"Error", MB_ICONERROR);
+ exit(EXIT_FAILURE);
+ }
+
+#ifdef VERBOSE
+ printf("pCurlEasySetoptAddress: %" PRIXPTR "\n", pCurlEasySetoptAddress);
+#endif // VERBOSE
+
+ lpCurlSetopt = reinterpret_cast(pCurlSetoptAddress);
+ CurlSetopt = reinterpret_cast(lpCurlSetopt);
+
+ lpCurlEasySetopt = reinterpret_cast(pCurlEasySetoptAddress);
+
+ pCurlEasySetoptHook = new VHook();
+ pCurlEasySetoptHook->Hook((uintptr_t)lpCurlEasySetopt, (uintptr_t)CurlEasySetopt);
+}
+
+#endif // CURL_H
diff --git a/AuroraNative/dllmain.cpp b/AuroraNative/dllmain.cpp
index 9dc0e5a..d25d6bc 100644
--- a/AuroraNative/dllmain.cpp
+++ b/AuroraNative/dllmain.cpp
@@ -1,15 +1,14 @@
-#include "pch.h"
+#include
#include "util.h"
-#include "hooks.h"
+#include "curl.h"
VOID Main() {
+//#ifdef VERBOSE
Util::InitConsole();
+//#endif
- printf("Aurora, made with <3 by Cyuubi and Slushia.\n");
- printf("Discord: https://discord.gg/AuroraFN\n\n");
-
- InitHooks();
+ InitCurl();
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) {
diff --git a/AuroraNative/framework.h b/AuroraNative/framework.h
deleted file mode 100644
index 8e88283..0000000
--- a/AuroraNative/framework.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#pragma once
-
-#include "build.h"
-
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include