diff --git a/WpfApp6.sln b/WpfApp6.sln
new file mode 100644
index 0000000..7bd9200
--- /dev/null
+++ b/WpfApp6.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.5.33530.505
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PSTW", "WpfApp6\PSTW.csproj", "{355A0DBF-B506-4AFC-9C0E-2884A2169337}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {355A0DBF-B506-4AFC-9C0E-2884A2169337}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {355A0DBF-B506-4AFC-9C0E-2884A2169337}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {355A0DBF-B506-4AFC-9C0E-2884A2169337}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {355A0DBF-B506-4AFC-9C0E-2884A2169337}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {13A9430D-AC9A-43D0-92CB-D4263C2DCE35}
+ EndGlobalSection
+EndGlobal
diff --git a/WpfApp6/82b12ac249fbb223299e6a234b87b948.ico b/WpfApp6/82b12ac249fbb223299e6a234b87b948.ico
new file mode 100644
index 0000000..38ffeda
Binary files /dev/null and b/WpfApp6/82b12ac249fbb223299e6a234b87b948.ico differ
diff --git a/WpfApp6/App.xaml b/WpfApp6/App.xaml
new file mode 100644
index 0000000..9ab1b04
--- /dev/null
+++ b/WpfApp6/App.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WpfApp6/App.xaml.cs b/WpfApp6/App.xaml.cs
new file mode 100644
index 0000000..9a7b964
--- /dev/null
+++ b/WpfApp6/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace WpfApp6
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/WpfApp6/AssemblyInfo.cs b/WpfApp6/AssemblyInfo.cs
new file mode 100644
index 0000000..427f202
--- /dev/null
+++ b/WpfApp6/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/WpfApp6/MainWindow.xaml b/WpfApp6/MainWindow.xaml
new file mode 100644
index 0000000..7196552
--- /dev/null
+++ b/WpfApp6/MainWindow.xaml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WpfApp6/MainWindow.xaml.cs b/WpfApp6/MainWindow.xaml.cs
new file mode 100644
index 0000000..3703ff4
--- /dev/null
+++ b/WpfApp6/MainWindow.xaml.cs
@@ -0,0 +1,165 @@
+using ModernWpf.Controls;
+using System;
+using System.Net;
+using System.Net.Http;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Navigation;
+using WpfApp6.Pages;
+using ModernWpf.Media.Animation;
+using System.Net.NetworkInformation;
+using System.IO;
+
+namespace WpfApp6
+{
+ public partial class MainWindow : Window
+ {
+ Home home = new Home();
+ Settings settings = new Settings();
+ Downloader download = new Downloader();
+ Loading loading = new Loading();
+ AnnouncementsPage announcementsPage = new AnnouncementsPage(); // Add AnnouncementsPage instance
+
+ public MainWindow()
+ {
+ InitializeComponent();
+
+ if (!CheckInternetConnection())
+ {
+ MessageBox.Show("You need to be connected to the internet.");
+ Close();
+ }
+
+ ContentFrame.Navigate(loading);
+
+ // Check server status and Version
+ CheckServerStatusAndVersion();
+ }
+
+ private void NavView_Loaded(object sender, RoutedEventArgs e)
+ {
+ ContentFrame.Navigate(home);
+ }
+
+ private bool CheckInternetConnection()
+ {
+ try
+ {
+ Ping ping = new Ping();
+ PingReply reply = ping.Send("www.google.com", 3000);
+ return reply != null && reply.Status == IPStatus.Success;
+ }
+ catch
+ {
+ return false;
+ }
+ }
+
+ private void NavView_SelectionChanged(ModernWpf.Controls.NavigationView sender, ModernWpf.Controls.NavigationViewSelectionChangedEventArgs args)
+ {
+ if (args.IsSettingsSelected)
+ {
+ ContentFrame.Navigate(settings);
+ }
+ else
+ {
+ NavigationViewItem item = args.SelectedItem as NavigationViewItem;
+
+ if (item != null)
+ {
+ if (item.Tag != null)
+ {
+ if (item.Tag.ToString() == "Home")
+ {
+ ContentFrame.Navigate(home);
+ }
+ else if (item.Tag.ToString() == "Downloader")
+ {
+ ContentFrame.Navigate(new Downloader());
+ }
+ else if (item.Tag.ToString() == "Announcements")
+ {
+ ContentFrame.Navigate(announcementsPage);
+ }
+ }
+ }
+ }
+ }
+
+ private async void CheckServerStatusAndVersion()
+ {
+ try
+ {
+ // Check server status
+ await CheckUrlEndpoint("http://127.0.0.1:5000/api/access_status"); //replace with your actual server ip
+
+ // Check version
+ using (HttpClient client = new HttpClient())
+ {
+ HttpResponseMessage response = await client.GetAsync("http://127.0.0.1:5000/api/version"); //replace with your actual server ip
+
+ if (response.IsSuccessStatusCode)
+ {
+ string jsonString = await response.Content.ReadAsStringAsync();
+
+ // Parse the JSON string
+ var json = System.Text.Json.JsonDocument.Parse(jsonString);
+ var version = json.RootElement.GetProperty("version").GetString();
+
+ if (version.Equals("0.3", StringComparison.InvariantCulture))
+ {
+ // Continue with the rest of the code
+ ContentFrame.Navigate(home);
+ }
+ else
+ {
+ MessageBox.Show($"Please Update The Launcher to {version}");
+ Close();
+ }
+ }
+ else
+ {
+ MessageBox.Show($"Server returned non-success status code: {response.StatusCode}");
+ Close();
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show($"An error occurred: {ex.Message}");
+ Close();
+ }
+ }
+
+ private async Task CheckUrlEndpoint(string url)
+ {
+ using (HttpClient client = new HttpClient())
+ {
+ HttpResponseMessage response = await client.GetAsync(url);
+
+ if (response.IsSuccessStatusCode)
+ {
+ string content = await response.Content.ReadAsStringAsync();
+
+ if (content.Equals("Denied", StringComparison.OrdinalIgnoreCase))
+ {
+ MessageBox.Show("Server Maintenance", "Access Denied");
+ Close();
+ }
+ // No need to check for "Allowed" explicitly, as it will continue with the execution
+ }
+ else
+ {
+ MessageBox.Show($"Failed to check the URL. Status code: {response.StatusCode}");
+ Close();
+ }
+ }
+ }
+
+ private void ContentFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
+ {
+ throw new Exception("Failed to load Page."); // Never TBH
+ }
+ }
+}
diff --git a/WpfApp6/PSTW.csproj b/WpfApp6/PSTW.csproj
new file mode 100644
index 0000000..b9a33ff
--- /dev/null
+++ b/WpfApp6/PSTW.csproj
@@ -0,0 +1,33 @@
+
+
+
+ WinExe
+ net6.0-windows
+ enable
+ true
+ 82b12ac249fbb223299e6a234b87b948.ico
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WpfApp6/PSTW.csproj.user b/WpfApp6/PSTW.csproj.user
new file mode 100644
index 0000000..8d0f58e
--- /dev/null
+++ b/WpfApp6/PSTW.csproj.user
@@ -0,0 +1,42 @@
+
+
+
+ <_LastSelectedProfileId>C:\Users\vloge\source\repos\WpfApp6\WpfApp6\Properties\PublishProfiles\FolderProfile.pubxml
+
+
+
+ Designer
+
+
+
+
+ Code
+
+
+ Code
+
+
+ Code
+
+
+ Code
+
+
+
+
+ Designer
+
+
+ Designer
+
+
+ Designer
+
+
+ Designer
+
+
+ Designer
+
+
+
\ No newline at end of file
diff --git a/WpfApp6/Pages/82b12ac249fbb223299e6a234b87b948.png b/WpfApp6/Pages/82b12ac249fbb223299e6a234b87b948.png
new file mode 100644
index 0000000..dd16cc0
Binary files /dev/null and b/WpfApp6/Pages/82b12ac249fbb223299e6a234b87b948.png differ
diff --git a/WpfApp6/Pages/AnnouncementsPage.xaml b/WpfApp6/Pages/AnnouncementsPage.xaml
new file mode 100644
index 0000000..538c503
--- /dev/null
+++ b/WpfApp6/Pages/AnnouncementsPage.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/WpfApp6/Pages/AnnouncementsPage.xaml.cs b/WpfApp6/Pages/AnnouncementsPage.xaml.cs
new file mode 100644
index 0000000..709cac9
--- /dev/null
+++ b/WpfApp6/Pages/AnnouncementsPage.xaml.cs
@@ -0,0 +1,125 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Http;
+using Newtonsoft.Json.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+
+namespace WpfApp6.Pages
+{
+ public partial class AnnouncementsPage : Page
+ {
+ public AnnouncementsPage()
+ {
+ InitializeComponent();
+ LoadDataFromApi();
+ }
+
+ private async void LoadDataFromApi()
+ {
+ try
+ {
+ string apiUrl = "http://127.0.0.1:5000/api/announcements"; //replace with actual server url
+ using (HttpClient client = new HttpClient())
+ {
+ string jsonResult = await client.GetStringAsync(apiUrl);
+
+ JObject data = JObject.Parse(jsonResult);
+
+ if (data != null)
+ {
+ // Assuming "announcements" is the property containing the array of announcements
+ JArray announcementsArray = (JArray)data["announcements"];
+
+ if (announcementsArray != null)
+ {
+ // Deserialize the JSON array into a list of Announcement objects
+ List announcements = announcementsArray.Select(item => new Announcement
+ {
+ Author = item["author"].ToString(),
+ Avatar = item["avatar"].ToString(),
+ Message = item["message"].ToString(),
+ DateTime = DateTime.Parse(item["datetime"].ToString()) // Assuming the datetime field in JSON
+ }).ToList();
+
+ // Sort the announcements by DateTime in descending order (newest first)
+ announcements = announcements.OrderByDescending(a => a.DateTime).ToList();
+
+ // Display the sorted announcements
+ foreach (var announcement in announcements)
+ {
+ AddAnnouncementToUI(announcement.Author, announcement.Avatar, announcement.Message, announcement.DateTime);
+ }
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show($"Error: {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
+ }
+ }
+
+ private void AddAnnouncementToUI(string author, string avatarUrl, string message, DateTime dateTime)
+ {
+
+ // Assume dateTime is in UTC
+ var utcTime = DateTime.SpecifyKind(dateTime, DateTimeKind.Utc);
+
+ // Convert UTC time to local time
+ var localTimeZone = TimeZoneInfo.Local;
+ var localTimeConverted = TimeZoneInfo.ConvertTime(utcTime, localTimeZone);
+
+ StackPanel announcementPanel = new StackPanel
+ {
+ Orientation = Orientation.Horizontal,
+ Margin = new Thickness(10)
+ };
+
+ Image avatarImage = new Image
+ {
+ Source = new System.Windows.Media.Imaging.BitmapImage(new Uri(avatarUrl)),
+ Width = 50,
+ Height = 50,
+ Margin = new Thickness(0, 0, 10, 0)
+ };
+
+ TextBlock authorTextBlock = new TextBlock
+ {
+ Text = $"{author}",
+ FontWeight = FontWeights.Bold,
+ Foreground = new System.Windows.Media.SolidColorBrush((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#ff00e2"))
+ };
+
+ TextBlock messageTextBlock = new TextBlock
+ {
+ Text = message,
+ Margin = new Thickness(10, 0, 0, 0)
+ };
+
+ TextBlock dateTextBlock = new TextBlock
+ {
+ Text = $" ({localTimeConverted:yyyy-MM-dd HH:mm})",
+ Foreground = new System.Windows.Media.SolidColorBrush((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#87CEEB")) // Light blue color
+ };
+
+ announcementPanel.Children.Add(avatarImage);
+ announcementPanel.Children.Add(authorTextBlock);
+ announcementPanel.Children.Add(messageTextBlock);
+ announcementPanel.Children.Add(dateTextBlock);
+
+ AnnouncementsStackPanel.Children.Add(announcementPanel);
+ }
+ }
+
+ // Define a class to represent an Announcement
+ public class Announcement
+ {
+ public string Author { get; set; }
+ public string Avatar { get; set; }
+ public string Message { get; set; }
+ public DateTime DateTime { get; set; }
+ }
+}
diff --git a/WpfApp6/Pages/CloudArrow.png b/WpfApp6/Pages/CloudArrow.png
new file mode 100644
index 0000000..973c09c
Binary files /dev/null and b/WpfApp6/Pages/CloudArrow.png differ
diff --git a/WpfApp6/Pages/Download.png b/WpfApp6/Pages/Download.png
new file mode 100644
index 0000000..8af7110
Binary files /dev/null and b/WpfApp6/Pages/Download.png differ
diff --git a/WpfApp6/Pages/Downloader.xaml b/WpfApp6/Pages/Downloader.xaml
new file mode 100644
index 0000000..2140a03
--- /dev/null
+++ b/WpfApp6/Pages/Downloader.xaml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/WpfApp6/Pages/Downloader.xaml.cs b/WpfApp6/Pages/Downloader.xaml.cs
new file mode 100644
index 0000000..3c03f3b
--- /dev/null
+++ b/WpfApp6/Pages/Downloader.xaml.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Forms;
+using SevenZip;
+
+namespace WpfApp6.Pages
+{
+ ///
+ /// Interaction logic for Downloader.xaml
+ ///
+ public partial class Downloader : System.Windows.Controls.UserControl
+ {
+ public Downloader()
+ {
+ InitializeComponent();
+ }
+
+ private void Button1_Click(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ // Ask where it should download to
+ FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
+ DialogResult result = folderBrowserDialog.ShowDialog();
+
+ if (result == DialogResult.OK)
+ {
+ string downloadPath = folderBrowserDialog.SelectedPath;
+
+ // Download a file from a website
+ WebClient webClient = new WebClient();
+ // Hook up the event handler for download progress
+ webClient.DownloadProgressChanged += WebClient_DownloadProgressChanged;
+ // Start the Download
+ webClient.DownloadFile("https://example.com/samplefile.zip", System.IO.Path.Combine(downloadPath, "samplefile.zip")); //replace with link to download
+
+ // For simplicity, I'll just show a message box
+ System.Windows.MessageBox.Show("File downloaded and extracted successfully!");
+ }
+ }
+ catch (Exception ex)
+ {
+ System.Windows.MessageBox.Show($"Error: {ex.Message}");
+ }
+ }
+
+ private void WebClient_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
+ {
+ // Update the progress bar value based on the download progress
+ DownloadProgressBar.Value = e.ProgressPercentage;
+ }
+ }
+}
diff --git a/WpfApp6/Pages/Home.xaml b/WpfApp6/Pages/Home.xaml
new file mode 100644
index 0000000..934cc85
--- /dev/null
+++ b/WpfApp6/Pages/Home.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/WpfApp6/Pages/Home.xaml.cs b/WpfApp6/Pages/Home.xaml.cs
new file mode 100644
index 0000000..240d3fa
--- /dev/null
+++ b/WpfApp6/Pages/Home.xaml.cs
@@ -0,0 +1,95 @@
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Net;
+using System.Reflection;
+using System.Windows;
+using WpfApp6.Services;
+using WpfApp6.Services.Launch;
+
+namespace WpfApp6.Pages
+{
+ ///
+ /// Interaction logic for Home.xaml
+ ///
+ public partial class Home
+ {
+ public Home()
+ {
+ InitializeComponent();
+ }
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ string path69 = UpdateINI.ReadValue("Auth", "Path");
+ if (path69 != "NONE")
+ {
+ string exeFilePath = System.IO.Path.Join(path69, "FortniteGame\\Binaries\\Win64\\FortniteClient-Win64-Shipping.exe");
+
+ // Check if the file exists and its version matches
+ if (File.Exists(exeFilePath) && IsFileVersionMatch(exeFilePath, new Version("4.21.0.0")))
+ {
+ if (UpdateINI.ReadValue("Auth", "Email") == "NONE" || UpdateINI.ReadValue("Auth", "Password") == "NONE")
+ {
+ MessageBox.Show("Please Add Your STW - Reborn Info In Settings");
+ return;
+ }
+
+ WebClient OMG = new WebClient();
+ OMG.DownloadFile("https://cdn.discordapp.com/attachments/1173026686359584808/1173059010568650802/STWCurl.dll?ex=65629356&is=65501e56&hm=3089fbfad67a76a163a5d207ff239628fb62917c66536782962f73901dd7025c&", Path.Combine(path69, "Engine\\Binaries\\ThirdParty\\NVIDIA\\NVaftermath\\Win64", "GFSDK_Aftermath_Lib.x64.dll")); //replace with your curl
+
+ PSBasics.Start(path69, "-epicapp=Fortnite -epicenv=Prod -epiclocale=en-us -epicportal -noeac -fromfl=be -fltoken=h1cdhchd10150221h130eB56 -skippatchcheck", UpdateINI.ReadValue("Auth", "Email"), UpdateINI.ReadValue("Auth", "Password"));
+
+ FakeAC.Start(path69, "FortniteClient-Win64-Shipping_BE.exe", $"-epicapp=Fortnite -epicenv=Prod -epiclocale=en-us -epicportal -noeac -fromfl=be -fltoken=h1cdhchd10150221h130eB56 -skippatchcheck", "r");
+ FakeAC.Start(path69, "FortniteLauncher.exe", $"-epicapp=Fortnite -epicenv=Prod -epiclocale=en-us -epicportal -noeac -fromfl=be -fltoken=h1cdhchd10150221h130eB56 -skippatchcheck", "dsf");
+
+ PSBasics._FortniteProcess.WaitForExit();
+
+ try
+ {
+ FakeAC._FNLauncherProcess.Close();
+ FakeAC._FNAntiCheatProcess.Close();
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("There has been an error closing");
+ }
+ }
+ else
+ {
+ MessageBox.Show("Error: Either the file does not exist or the version is incorrect!\nVersion Required: 5.41");
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show("UNKNOWN ERROR");
+ }
+ }
+
+ static bool IsFileVersionMatch(string filePath, Version expectedVersion)
+ {
+ try
+ {
+ FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(filePath);
+
+ int fileMajorPart = fileVersionInfo.FileMajorPart;
+ int fileMinorPart = fileVersionInfo.FileMinorPart;
+ int fileBuildPart = fileVersionInfo.FileBuildPart;
+ int filePrivatePart = fileVersionInfo.FilePrivatePart;
+
+ return fileMajorPart == expectedVersion.Major &&
+ fileMinorPart == expectedVersion.Minor &&
+ fileBuildPart == expectedVersion.Build &&
+ filePrivatePart == expectedVersion.Revision;
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show($"Error: {ex.Message}");
+ return false;
+ }
+ }
+ }
+}
diff --git a/WpfApp6/Pages/Loading.xaml b/WpfApp6/Pages/Loading.xaml
new file mode 100644
index 0000000..7e78ff6
--- /dev/null
+++ b/WpfApp6/Pages/Loading.xaml
@@ -0,0 +1,10 @@
+
+
+
+
+
diff --git a/WpfApp6/Pages/Loading.xaml.cs b/WpfApp6/Pages/Loading.xaml.cs
new file mode 100644
index 0000000..a73d87e
--- /dev/null
+++ b/WpfApp6/Pages/Loading.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace WpfApp6.Pages
+{
+ ///
+ /// Interaction logic for Page1.xaml
+ ///
+ public partial class Loading
+ {
+ public Loading()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/WpfApp6/Pages/Settings.xaml b/WpfApp6/Pages/Settings.xaml
new file mode 100644
index 0000000..b945dd0
--- /dev/null
+++ b/WpfApp6/Pages/Settings.xaml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WpfApp6/Pages/Settings.xaml.cs b/WpfApp6/Pages/Settings.xaml.cs
new file mode 100644
index 0000000..2509b99
--- /dev/null
+++ b/WpfApp6/Pages/Settings.xaml.cs
@@ -0,0 +1,81 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using WindowsAPICodePack.Dialogs;
+using WpfApp6.Services;
+using static System.Windows.Forms.VisualStyles.VisualStyleElement.Window;
+
+namespace WpfApp6.Pages
+{
+ ///
+ /// Interaction logic for Settings.xaml
+ ///
+ public partial class Settings : UserControl
+ {
+ public Settings()
+ {
+ InitializeComponent();
+ }
+
+ private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
+ {
+ //Regex r = new Regex(@"^[a-zA-Z@]+$");
+ //if (!r.IsMatch(e.Text))
+ //e.Handled = true;
+ }
+
+ private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
+ {
+
+ }
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ CommonOpenFileDialog commonOpenFileDialog = new CommonOpenFileDialog();
+ commonOpenFileDialog.IsFolderPicker = true;
+ commonOpenFileDialog.Title = "Select A Fortnite Build";
+ commonOpenFileDialog.Multiselect = false;
+ CommonFileDialogResult commonFileDialogResult = commonOpenFileDialog.ShowDialog();
+
+
+ bool flag = commonFileDialogResult == CommonFileDialogResult.Ok;
+ if (flag)
+ {
+ if (File.Exists(System.IO.Path.Join(commonOpenFileDialog.FileName, "FortniteGame\\Binaries\\Win64\\FortniteClient-Win64-Shipping.exe")))
+ {
+ this.PathBox.Text = commonOpenFileDialog.FileName;
+ }
+ else
+ {
+ MessageBox.Show("Please make sure that your the folder contains FortniteGame and Engine In");
+
+ }
+ }
+ }
+
+ private void Button_Click_1(object sender, RoutedEventArgs e)
+ {
+ UpdateINI.WriteToConfig("Auth","Email", EmailBox.Text);
+ UpdateINI.WriteToConfig("Auth", "Password", PasswordBox.Password);
+ UpdateINI.WriteToConfig("Auth", "Path", PathBox.Text);
+ }
+
+ private void PathBox_TextChanged(object sender, TextChangedEventArgs e)
+ {
+ UpdateINI.WriteToConfig("Auth", "Path", PathBox.Text); // Updates Live OMG!
+ }
+ }
+}
diff --git a/WpfApp6/Properties/Licenses.licx b/WpfApp6/Properties/Licenses.licx
new file mode 100644
index 0000000..c867e3f
--- /dev/null
+++ b/WpfApp6/Properties/Licenses.licx
@@ -0,0 +1 @@
+Telerik.Windows.Controls.RadNotifyIcon, Telerik.Windows.Controls.Navigation, Version=2022.3.1109.310, Culture=neutral, PublicKeyToken=5803cfa389c90ce7
diff --git a/WpfApp6/Properties/PublishProfiles/FolderProfile.pubxml b/WpfApp6/Properties/PublishProfiles/FolderProfile.pubxml
new file mode 100644
index 0000000..2db38f1
--- /dev/null
+++ b/WpfApp6/Properties/PublishProfiles/FolderProfile.pubxml
@@ -0,0 +1,18 @@
+
+
+
+
+ Release
+ Any CPU
+ bin\Release\net6.0-windows\publish\win-x64\
+ FileSystem
+ <_TargetId>Folder
+ net6.0-windows
+ win-x64
+ true
+ true
+ false
+
+
\ No newline at end of file
diff --git a/WpfApp6/Properties/PublishProfiles/FolderProfile.pubxml.user b/WpfApp6/Properties/PublishProfiles/FolderProfile.pubxml.user
new file mode 100644
index 0000000..2ee4005
--- /dev/null
+++ b/WpfApp6/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -0,0 +1,10 @@
+
+
+
+
+ True|2023-07-04T20:49:13.1871919Z;True|2023-07-04T18:07:33.0033043+01:00;True|2023-07-03T19:28:33.2007094+01:00;True|2023-07-03T19:26:52.9596367+01:00;True|2023-07-03T14:33:19.6511979+01:00;True|2023-07-03T13:18:02.6330185+01:00;True|2023-07-03T12:59:35.6618992+01:00;True|2023-07-02T14:31:30.7023566+01:00;False|2023-07-02T14:28:00.9894053+01:00;True|2023-07-02T14:26:09.9688668+01:00;
+
+
+
\ No newline at end of file
diff --git a/WpfApp6/Services/Launch/FakeAC.cs b/WpfApp6/Services/Launch/FakeAC.cs
new file mode 100644
index 0000000..ec2a026
--- /dev/null
+++ b/WpfApp6/Services/Launch/FakeAC.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace WpfApp6.Services.Launch
+{
+ // Goofy Code Need To Improve On V2
+ public class FakeAC
+ {
+ public static Process _FNLauncherProcess;
+ public static Process _FNAntiCheatProcess;
+
+ public static void Start(string Path69, string FileName, string args = "", string t = "r")
+ {
+ try {
+ if (File.Exists(Path.Combine(Path69, "FortniteGame\\Binaries\\Win64\\", FileName)))
+ {
+ ProcessStartInfo ProcessIG = new ProcessStartInfo()
+ {
+ FileName = Path.Combine(Path69, "FortniteGame\\Binaries\\Win64\\", FileName),
+ Arguments = args,
+ CreateNoWindow = true,
+ };
+
+ if(t == "r")
+ {
+ _FNAntiCheatProcess = Process.Start(ProcessIG);
+ if (_FNAntiCheatProcess.Id == 0)
+ {
+ MessageBox.Show("FAILED STARTING!?!?!");
+ }
+ _FNAntiCheatProcess.Freeze();
+ }else
+ {
+ _FNLauncherProcess = Process.Start(ProcessIG);
+ if (_FNLauncherProcess.Id == 0)
+ {
+ MessageBox.Show("FAILED STARTING!?!?!");
+ }
+ _FNLauncherProcess.Freeze();
+ }
+
+ }
+ }catch (Exception ex)
+ {
+ MessageBox.Show("THERE BEEN A ERROR");
+ }
+ }
+ }
+}
diff --git a/WpfApp6/Services/Launch/Freeze.cs b/WpfApp6/Services/Launch/Freeze.cs
new file mode 100644
index 0000000..c724b70
--- /dev/null
+++ b/WpfApp6/Services/Launch/Freeze.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+namespace WpfApp6.Services.Launch
+{
+ public static class Freeze69
+ {
+
+ [DllImport("kernel32.dll")]
+ private static extern IntPtr OpenThread(int dwDesiredAccess, bool bInheritHandle, uint dwThreadId);
+
+ [DllImport("kernel32.dll")]
+ private static extern uint SuspendThread(IntPtr hThread);
+
+ public static void Freeze(this Process process)
+ {
+
+ foreach (object obj in process.Threads)
+ {
+ ProcessThread thread = (ProcessThread)obj;
+ var Thread = OpenThread(2, false, (uint)thread.Id);
+ if (Thread == IntPtr.Zero)
+ {
+ break;
+ }
+ SuspendThread(Thread);
+ }
+ }
+ }
+}
diff --git a/WpfApp6/Services/Launch/PSBasics.cs b/WpfApp6/Services/Launch/PSBasics.cs
new file mode 100644
index 0000000..a1f58cd
--- /dev/null
+++ b/WpfApp6/Services/Launch/PSBasics.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace WpfApp6.Services.Launch
+{
+ public static class PSBasics
+ {
+ public static Process _FortniteProcess;
+ public static void Start(string PATH, string args, string Email, string Password)
+ {
+ if(Email == null || Password == null)
+ {
+ MessageBox.Show("Sorry Make Sure You Put Your PSTW Logins");
+ return;
+ }
+ if (File.Exists(Path.Combine(PATH, "FortniteGame\\Binaries\\Win64\\", "FortniteClient-Win64-Shipping.exe")))
+ {
+ PSBasics._FortniteProcess = new Process()
+ {
+ StartInfo = new ProcessStartInfo()
+ {
+ Arguments = $"-AUTH_LOGIN={Email} -AUTH_PASSWORD={Password} -AUTH_TYPE=epic " + args,
+ FileName = Path.Combine(PATH, "FortniteGame\\Binaries\\Win64\\", "FortniteClient-Win64-Shipping.exe")
+ },
+ EnableRaisingEvents = true
+ };
+ PSBasics._FortniteProcess.Exited += new EventHandler(PSBasics.OnFortniteExit);
+ PSBasics._FortniteProcess.Start();
+
+
+ }
+
+ }
+
+ public static void OnFortniteExit(object sender, EventArgs e)
+ {
+ Process fortniteProcess = PSBasics._FortniteProcess;
+ if (fortniteProcess != null && fortniteProcess.HasExited)
+ {
+ PSBasics._FortniteProcess = (Process)null;
+ }
+ FakeAC._FNLauncherProcess?.Kill();
+ FakeAC._FNAntiCheatProcess?.Kill();
+ }
+ }
+}
diff --git a/WpfApp6/Services/UpdateINI.cs b/WpfApp6/Services/UpdateINI.cs
new file mode 100644
index 0000000..666f682
--- /dev/null
+++ b/WpfApp6/Services/UpdateINI.cs
@@ -0,0 +1,62 @@
+using IniParser;
+using IniParser.Model;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WpfApp6.Services
+{
+ // Code Might Be Bad Never Really Touched INI Files
+ public static class UpdateINI
+ {
+ public static void WriteToConfig(string SectionName, string PathKey, string NewValue)
+ {
+ string BaseFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
+ string DataFolder = Path.Combine(BaseFolder, "PSTW");
+ Directory.CreateDirectory(DataFolder);
+ string FilePath = Path.Combine(DataFolder, "Settings.ini");
+
+
+ FileIniDataParser parser = new FileIniDataParser(); // nEW!
+
+ IniData iniData;
+ if (File.Exists(FilePath))
+ {
+ iniData = parser.ReadFile(FilePath);
+ }
+ else
+ {
+ iniData = new IniData();
+ }
+
+ // This Updates The Current Values - IG!?!?!?!?!?!??!?!//
+
+ //IniData iniData = parser.ReadFile(FilePath);
+ iniData[SectionName][PathKey] = NewValue;
+ parser.WriteFile(FilePath, iniData, null);
+ }
+
+ public static string ReadValue(string SectionName, string PathKey) // NO T writing !
+ {
+ string BaseFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
+ string DataFolder = Path.Combine(BaseFolder, "PSTW");
+ string FilePath = Path.Combine(DataFolder, "Settings.ini");
+
+ FileIniDataParser parser = new FileIniDataParser();
+
+ if (File.Exists(FilePath))
+ {
+ IniData iniData = parser.ReadFile(FilePath);
+
+ return iniData[SectionName][PathKey];
+ }
+ else
+ {
+ return "NONE";
+ }
+ }
+ }
+}