From 66cfe955579a9f8d9448f4872f645d1f8b1a6653 Mon Sep 17 00:00:00 2001 From: Rich Dunne Date: Mon, 14 Sep 2020 12:11:44 -0600 Subject: [PATCH] Removed code pertaining to Patreon verification --- SceneManager/EntryPoint.cs | 12 ------ SceneManager/SceneManager.csproj | 1 - SceneManager/Verification.cs | 68 -------------------------------- 3 files changed, 81 deletions(-) delete mode 100644 SceneManager/Verification.cs diff --git a/SceneManager/EntryPoint.cs b/SceneManager/EntryPoint.cs index d6edc62..cadf4c7 100644 --- a/SceneManager/EntryPoint.cs +++ b/SceneManager/EntryPoint.cs @@ -79,15 +79,3 @@ namespace SceneManager } } } - -//// id is hardware ID and needs to match PatronKey, which is also hardware ID -//if (Settings.id == Settings.PatronKey) -//{ -// Game.LogTrivial($"Patron status verified."); -// Game.DisplayNotification($"~o~Scene Manager\n~g~[Patreon]~w~ Thanks for the support, enjoy your session!"); -//} -//else -//{ -// Game.LogTrivial($"Patron status not verified."); -// Game.DisplayNotification($"~o~Scene Manager\n~y~[Patreon]~w~ Thanks for using my plugin! If you would like to gain access to benefits such as ~g~new features for this plugin~w~, ~g~early access to new plugins~w~, and ~g~custom plugins made just for you~w~, please consider supporting me on ~b~Patreon~w~. ~y~https://www.patreon.com/richdevs"); -//} diff --git a/SceneManager/SceneManager.csproj b/SceneManager/SceneManager.csproj index 5f83c6d..9c579ae 100644 --- a/SceneManager/SceneManager.csproj +++ b/SceneManager/SceneManager.csproj @@ -69,7 +69,6 @@ - diff --git a/SceneManager/Verification.cs b/SceneManager/Verification.cs deleted file mode 100644 index 1665e4a..0000000 --- a/SceneManager/Verification.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System.Management; -using System.Text; -using Rage; - -namespace SceneManager -{ - class Verification - { - // https://www.codingame.com/playgrounds/11117/simple-encryption-using-c-and-xor-technique - // Get hardware ID from user - // encrypt hardware ID - // show encrypted ID in log - // decrypt ID for hardware ID - // Give user their hardware ID for ini - // Pass hardware ID through encryption for a match - public static string GetID() - { - // Get processor ID - ManagementObjectCollection mbsList = null; - ManagementObjectSearcher mbs = new ManagementObjectSearcher("Select * From Win32_processor"); - mbsList = mbs.Get(); - string processorID = ""; - foreach (ManagementObject mo in mbsList) - { - processorID = mo["ProcessorID"].ToString(); - } - - // Get HD ID - /*ManagementObject dsk = new ManagementObject(@"win32_logicaldisk.deviceid=""c:"""); - dsk.Get(); - string hdID = dsk["VolumeSerialNumber"].ToString();*/ - - // Get MoBo ID - ManagementObjectSearcher mos = new ManagementObjectSearcher("SELECT * FROM Win32_BaseBoard"); - ManagementObjectCollection moc = mos.Get(); - string motherBoardID = ""; - foreach (ManagementObject mo in moc) - { - motherBoardID = (string)mo["SerialNumber"]; - } - - string uniqueID = processorID + motherBoardID; - string encrypted = passThrough(uniqueID); - //Game.LogTrivial($"Processor ID: {processorID}"); - //Game.LogTrivial($"HD ID: {hdID}"); - //Game.LogTrivial($"Motherboard ID: {motherBoardID}"); - //Game.LogTrivial($"{uniqueID}"); - Game.LogTrivial($"{encrypted}"); // Get this value from user's log as their key. When they put it in the .ini, it will go back through passThrough and match with their uniqueID - //Game.LogTrivial($"Decrypted: {passThrough(encrypted)}"); - return encrypted; - } - - public static string passThrough(string id) - { - StringBuilder szInputStringBuild = new StringBuilder(id); - StringBuilder szOutStringBuild = new StringBuilder(id.Length); - char Textch; - for (int iCount = 0; iCount < id.Length; iCount++) - { - Textch = szInputStringBuild[iCount]; - Textch = (char)(Textch ^ 1); - szOutStringBuild.Append(Textch); - } - - return szOutStringBuild.ToString(); - } - } -}