diff --git a/League Pass Manager.sln b/League Pass Manager.sln
new file mode 100644
index 0000000..93d1e54
--- /dev/null
+++ b/League Pass Manager.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31313.79
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "League Pass Manager", "League Pass Manager\League Pass Manager.csproj", "{AB20FF9E-31F1-409C-92C6-7787FC8DDB53}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {AB20FF9E-31F1-409C-92C6-7787FC8DDB53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AB20FF9E-31F1-409C-92C6-7787FC8DDB53}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AB20FF9E-31F1-409C-92C6-7787FC8DDB53}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AB20FF9E-31F1-409C-92C6-7787FC8DDB53}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {0E961FB7-2FF8-4C0A-B39B-A3ED5CD465B1}
+ EndGlobalSection
+EndGlobal
diff --git a/League Pass Manager/App.xaml b/League Pass Manager/App.xaml
new file mode 100644
index 0000000..24ba019
--- /dev/null
+++ b/League Pass Manager/App.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/League Pass Manager/App.xaml.cs b/League Pass Manager/App.xaml.cs
new file mode 100644
index 0000000..8435a8b
--- /dev/null
+++ b/League Pass Manager/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 League_Pass_Manager
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/League Pass Manager/AssemblyInfo.cs b/League Pass Manager/AssemblyInfo.cs
new file mode 100644
index 0000000..8b5504e
--- /dev/null
+++ b/League Pass Manager/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/League Pass Manager/League Pass Manager.csproj b/League Pass Manager/League Pass Manager.csproj
new file mode 100644
index 0000000..5cc7372
--- /dev/null
+++ b/League Pass Manager/League Pass Manager.csproj
@@ -0,0 +1,27 @@
+
+
+
+ WinExe
+ net5.0-windows
+ League_Pass_Manager
+ true
+ internet_lock_locked_padlock_password_secure_security_icon_127100.ico
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/League Pass Manager/MainWindow.xaml b/League Pass Manager/MainWindow.xaml
new file mode 100644
index 0000000..e389172
--- /dev/null
+++ b/League Pass Manager/MainWindow.xaml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/League Pass Manager/MainWindow.xaml.cs b/League Pass Manager/MainWindow.xaml.cs
new file mode 100644
index 0000000..1d2bc2f
--- /dev/null
+++ b/League Pass Manager/MainWindow.xaml.cs
@@ -0,0 +1,194 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Runtime.InteropServices;
+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;
+using WindowsInput;
+using WindowsInput.Native;
+using MahApps.Metro.Controls;
+using Newtonsoft.Json;
+using Rijndael256;
+using System.IO;
+using System.ComponentModel;
+
+namespace League_Pass_Manager
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ ///
+
+ public partial class MainWindow : MetroWindow
+ {
+
+ [DllImport("user32.dll")]
+ internal static extern IntPtr SetForegroundWindow(IntPtr hWnd);
+
+ [DllImport("user32.dll")]
+ internal static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); //ShowWindow needs an IntPtr
+
+ [DllImport("user32.dll")]
+ static extern bool PostMessage(IntPtr hWnd, UInt32 Msg, int wParam, int lParam);
+ [DllImport("user32.dll")]
+ static extern byte VkKeyScan(char ch);
+
+ //include SendMessage
+ [DllImport("user32.dll")]
+ public static extern int SendMessage(IntPtr hWnd, int uMsg, int wParam, string lParam);
+
+ //include FindWindowEx
+ [DllImport("user32.dll")]
+ public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
+
+ public class Account
+ {
+ public string region { get; set; }
+ public string description { get; set; }
+ public string userName { get; set; }
+ public string password { get; set; }
+ }
+
+ public List accounts = new List();
+ string password;
+
+ void saveAccounts(string password)
+ {
+ string jsonList = JsonConvert.SerializeObject(accounts);
+ string aeCiphertext = RijndaelEtM.Encrypt(jsonList, password, KeySize.Aes256);
+ File.WriteAllText("accounts.txt", aeCiphertext);
+ }
+
+ bool readAccounts()
+ {
+ string jsonString = "";
+ try
+ {
+ jsonString = File.ReadAllText("accounts.txt");
+ } catch(Exception e)
+ {
+ MessageBox.Show("Account file doesn't exist yet and will be created now. Double check your encryption key and memorize it or write it down. You won't be able to access your account data without it!" + Environment.NewLine + Environment.NewLine + "Your encryption key: " + password, "WARNING", MessageBoxButton.OK, MessageBoxImage.Exclamation);
+ return true;
+ }
+
+ string plaintext = "";
+ try
+ {
+ plaintext = RijndaelEtM.Decrypt(jsonString, password, KeySize.Aes256);
+ } catch (Exception e)
+ {
+ MessageBox.Show("Wrong decryption phrase");
+ return false;
+ }
+ try
+ {
+ accounts = JsonConvert.DeserializeObject>(plaintext);
+ }
+ catch (Exception e)
+ {
+ MessageBox.Show("Accounts file corrupted!");
+ return false;
+ }
+ return true;
+ }
+
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ IntPtr hWnd;
+ Process[] processRunning = Process.GetProcesses();
+ foreach (Process pr in processRunning)
+ {
+ if (pr.ProcessName == "RiotClientUx")
+ {
+ hWnd = pr.MainWindowHandle;
+ ShowWindow(hWnd, 3);
+ SetForegroundWindow(hWnd);
+ var inputSimulator = new InputSimulator();
+ Account selectedAccount = new Account();
+ try
+ {
+ selectedAccount = (Account)datagrid1.SelectedItem;
+ } catch (Exception exce)
+ {
+ MessageBox.Show("You need to select an account first!");
+ return;
+ }
+
+ Account result = accounts.Find(x => x.userName == selectedAccount.userName);
+
+ inputSimulator.Keyboard.TextEntry(result.userName);
+ inputSimulator.Keyboard.KeyDown((VirtualKeyCode.TAB));
+ inputSimulator.Keyboard.TextEntry(result.password);
+ inputSimulator.Keyboard.KeyDown((VirtualKeyCode.RETURN));
+ }
+ }
+ }
+
+
+ private void datagrid1_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
+ {
+ saveAccounts(password);
+ }
+
+ private void unlockButton_Click(object sender, RoutedEventArgs e)
+ {
+ password = encryptionKey.Password;
+
+ if (readAccounts())
+ {
+ datagrid1.ItemsSource = null;
+ datagrid1.ItemsSource = accounts;
+ datagrid1.Items.Refresh();
+ passwordPromptGrid.Visibility = Visibility.Hidden;
+ Application.Current.MainWindow.Height = 400;
+
+ mainGrid.Visibility = Visibility.Visible;
+ }
+
+ }
+
+ private void datagrid1_RowEditEnding(object sender, DataGridRowEditEndingEventArgs e)
+ {
+ saveAccounts(password);
+ }
+
+ private void Button_Click_1(object sender, RoutedEventArgs e)
+ {
+ Account selectedAccount = new Account();
+ try
+ {
+ selectedAccount = (Account)datagrid1.SelectedItem;
+ } catch(Exception ex)
+ {
+ MessageBox.Show("Select an account first!");
+ return;
+ }
+
+ if (MessageBox.Show("Are you sure you want to remove this account: " + selectedAccount.userName + "?", "Remove Account", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
+ {
+ accounts.RemoveAll(a => a == selectedAccount);
+ datagrid1.Items.Refresh();
+ }
+ }
+
+ private void datagrid1_CurrentCellChanged(object sender, EventArgs e)
+ {
+ saveAccounts(password);
+ }
+ }
+}
diff --git a/League Pass Manager/internet_lock_locked_padlock_password_secure_security_icon_127100.ico b/League Pass Manager/internet_lock_locked_padlock_password_secure_security_icon_127100.ico
new file mode 100644
index 0000000..e6c6fa4
Binary files /dev/null and b/League Pass Manager/internet_lock_locked_padlock_password_secure_security_icon_127100.ico differ