1
Fork 0
mirror of https://github.com/thegeneralist01/Scene-Manager-DevRepo synced 2026-01-11 15:40:29 +01:00

Removed code pertaining to Patreon verification

This commit is contained in:
Rich Dunne 2020-09-14 12:11:44 -06:00
parent 24e9b51810
commit 66cfe95557
3 changed files with 0 additions and 81 deletions

View file

@ -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");
//}

View file

@ -69,7 +69,6 @@
<Compile Include="Menus\SettingsMenu.cs" />
<Compile Include="Settings.cs" />
<Compile Include="VehicleCollector.cs" />
<Compile Include="Verification.cs" />
<Compile Include="Object Classes\Waypoint.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View file

@ -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();
}
}
}