54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
// See https://aka.ms/new-console-template for more information
|
|
using System.Text;
|
|
using System.Security.Cryptography;
|
|
|
|
|
|
Console.WriteLine("Hello! Welcome to the Reepead-Licencer!");
|
|
Console.WriteLine("RESIGA ING, Esslingen Germany, by J.H");
|
|
|
|
static string getHash(string password)
|
|
{
|
|
// create a ripemd160 object
|
|
RIPEMD160 r160 = RIPEMD160Managed.Create();
|
|
// convert the string to byte
|
|
byte[] myByte = System.Text.Encoding.ASCII.GetBytes(password);
|
|
// compute the byte to RIPEMD160 hash
|
|
byte[] encrypted = r160.ComputeHash(myByte);
|
|
// create a new StringBuilder process the hash byte
|
|
StringBuilder sb = new StringBuilder();
|
|
for (int i = 0; i < encrypted.Length; i++)
|
|
{
|
|
sb.Append(encrypted[i].ToString("X2"));
|
|
}
|
|
// convert the StringBuilder to String and convert it to lower case and return it.
|
|
return sb.ToString().ToLower();
|
|
}
|
|
var pass = "";
|
|
var counter = 2;
|
|
while (pass != "Qn9Sgujxt8X8BKQOtB7E")
|
|
{
|
|
Console.WriteLine("Enter Password:");
|
|
pass = Console.ReadLine();
|
|
if(counter == 0)
|
|
{
|
|
Environment.Exit(0);
|
|
}
|
|
counter--;
|
|
}
|
|
|
|
|
|
string val;
|
|
Console.Write("Enter UDID: ");
|
|
val = Console.ReadLine();
|
|
var hashed = getHash(val + "srffukghfiuzzsgiffgbsöKFVBGIs");
|
|
Console.WriteLine("Your LicenceKey is:");
|
|
Console.WriteLine(hashed.ToString());
|
|
|
|
Console.WriteLine("Press ESC to Exit");
|
|
do
|
|
{
|
|
while (!Console.KeyAvailable)
|
|
{
|
|
// Do something
|
|
}
|
|
} while (Console.ReadKey(true).Key != ConsoleKey.Escape); |