Advertisement
Guest User

Untitled

a guest
Jan 17th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 5.33 KB | None | 0 0
  1. using System;
  2. using System.IO;
  3. using System.Management;
  4. using System.Net;
  5. using System.Net.Security;
  6. using System.Security.Cryptography;
  7. using System.Security.Cryptography.X509Certificates;
  8. using System.Text;
  9. using System.Text.RegularExpressions;
  10. using System.Threading;
  11.  
  12. namespace skAuth
  13. {
  14.     // Token: 0x02000041 RID: 65
  15.     internal class Program
  16.     {
  17.         // Token: 0x0600058F RID: 1423
  18.         public static string GetSRC(string uri)
  19.         {
  20.             ServicePointManager.Expect100Continue = true;
  21.             ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
  22.             HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(uri);
  23.             httpWebRequest.AutomaticDecompression = (DecompressionMethods.GZip | DecompressionMethods.Deflate);
  24.             httpWebRequest.Proxy = null;
  25.             httpWebRequest.ServerCertificateValidationCallback = (RemoteCertificateValidationCallback)Delegate.Combine(httpWebRequest.ServerCertificateValidationCallback, new RemoteCertificateValidationCallback((object obj, X509Certificate cert, X509Chain ssl, SslPolicyErrors error) => (cert as X509Certificate2).Verify()));
  26.             string result;
  27.             using (HttpWebResponse response = (HttpWebResponse)httpWebRequest.GetResponse())
  28.             {
  29.                 using (Stream stream = response.GetResponseStream())
  30.                 {
  31.                     using (StreamReader reader = new StreamReader(stream))
  32.                     {
  33.                         result = reader.ReadToEnd();
  34.                     }
  35.                 }
  36.             }
  37.             return result;
  38.         }
  39.  
  40.         // Token: 0x06000590 RID: 1424
  41.         public static void login()
  42.         {
  43.             string b = Program.GetSRC("https://pastebin.com/raw/ZPrgeSYR");
  44.             if (b.Contains("v1"))
  45.             {
  46.                 Console.WriteLine("You are up to date! Enjoy the tool!");
  47.             }
  48.             else if (b.Contains("CRACKED"))
  49.             {
  50.                 Console.WriteLine("Tool has been leaked/cracked. Check out the server to see what happened.");
  51.                 Thread.Sleep(500);
  52.                 Environment.Exit(1);
  53.             }
  54.             else
  55.             {
  56.                 Console.WriteLine("You Are using an outdated client. Please update.");
  57.                 Thread.Sleep(500);
  58.                 Environment.Exit(1);
  59.             }
  60.             Console.Clear();
  61.             if (File.Exists("license.txt"))
  62.             {
  63.                 string input = File.ReadAllText("license.txt");
  64.                 string lic = Regex.Match(input, "LICKEY: (.*) \\| HWID: (.*)\r").Groups[1].ToString();
  65.                 string HWID = Regex.Match(input, "LICKEY: (.*) \\| HWID: (.*)\r").Groups[2].ToString();
  66.                 string wtfu = string.Concat(new string[]
  67.                 {
  68.                     "Skiddies",
  69.                     lic,
  70.                     HWID,
  71.                     DateTime.UtcNow.ToString("yyyy'-'MM'-'dd' 'HH':'mm"),
  72.                     "Skiddies"
  73.                 });
  74.                 if (Program.GetSRC(string.Concat(new string[]
  75.                 {
  76.                     "https://zionteam.tk/Auth/auth.php?authkey=",
  77.                     lic,
  78.                     "&hwid=",
  79.                     HWID,
  80.                     "&software_id=BHS"
  81.                 })).Contains(Program.ComputeSha256Hash(wtfu)))
  82.                 {
  83.                     Console.WriteLine("Access Granted!", ConsoleColor.Green);
  84.                     Console.WriteLine("PRESS ANY KEY TO CONTINUE");
  85.                     Console.ReadLine();
  86.                     Console.Clear();
  87.                     return;
  88.                 }
  89.                 Console.Write("Error... Make sure your key is active and our servers are not down...\nYour HWID:" + HWID, ConsoleColor.Red);
  90.                 Console.ReadLine();
  91.                 Environment.Exit(-1);
  92.                 return;
  93.             }
  94.             else
  95.             {
  96.                 Console.WriteLine("Please Input Your License");
  97.                 string AuthKey = Console.ReadLine();
  98.                 string hwid = Program.HWID();
  99.                 string wtfu2 = string.Concat(new string[]
  100.                 {
  101.                     "Skiddies",
  102.                     AuthKey,
  103.                     Program.HWID(),
  104.                     DateTime.UtcNow.ToString("yyyy'-'MM'-'dd' 'HH':'mm"),
  105.                     "Skiddies"
  106.                 });
  107.                 string[] info = new string[]
  108.                 {
  109.                     "LICKEY: " + AuthKey + " | HWID: " + hwid
  110.                 };
  111.                 File.Create("license.txt").Close();
  112.                 File.WriteAllLines("license.txt", info);
  113.                 if (Program.GetSRC(string.Concat(new string[]
  114.                 {
  115.                     "https://zionteam.tk/Auth/auth.php?authkey=",
  116.                     AuthKey,
  117.                     "&hwid=",
  118.                     hwid,
  119.                     "&software_id=BHS"
  120.                 })).Contains(Program.ComputeSha256Hash(wtfu2)))
  121.                 {
  122.                     Console.WriteLine("Access Granted!", ConsoleColor.Green);
  123.                     Console.WriteLine("PRESS ANY KEY TO CONTINUE");
  124.                     Console.ReadLine();
  125.                     Console.Clear();
  126.                     return;
  127.                 }
  128.                 Console.Write("Error... Make sure your key is active and our servers are not down...\nYour HWID:" + hwid, ConsoleColor.Red);
  129.                 Console.ReadLine();
  130.                 Environment.Exit(-1);
  131.                 return;
  132.             }
  133.         }
  134.  
  135.         // Token: 0x06000591 RID: 1425
  136.         private static string ComputeSha256Hash(string rawData)
  137.         {
  138.             string result;
  139.             using (SHA256 sha256Hash = SHA256.Create())
  140.             {
  141.                 byte[] bytes = sha256Hash.ComputeHash(Encoding.UTF8.GetBytes(rawData));
  142.                 StringBuilder builder = new StringBuilder();
  143.                 for (int i = 0; i < bytes.Length; i++)
  144.                 {
  145.                     builder.Append(bytes[i].ToString("x2"));
  146.                 }
  147.                 result = builder.ToString();
  148.             }
  149.             return result;
  150.         }
  151.  
  152.         // Token: 0x06000592 RID: 1426
  153.         private static string HWID()
  154.         {
  155.             string text2 = null;
  156.             if (string.IsNullOrEmpty(text2))
  157.             {
  158.                 foreach (DriveInfo driveInfo in DriveInfo.GetDrives())
  159.                 {
  160.                     if (driveInfo.IsReady)
  161.                     {
  162.                         text2 = driveInfo.RootDirectory.ToString();
  163.                         break;
  164.                     }
  165.                 }
  166.             }
  167.             if (!string.IsNullOrEmpty(text2) && text2.EndsWith(":\\"))
  168.             {
  169.                 text2 = text2.Substring(0, text2.Length - 2);
  170.             }
  171.             string str;
  172.             using (ManagementObject managementObject = new ManagementObject("win32_logicaldisk.deviceid=\"" + text2 + ":\""))
  173.             {
  174.                 managementObject.Get();
  175.                 str = managementObject["VolumeSerialNumber"].ToString();
  176.             }
  177.             return str;
  178.         }
  179.     }
  180. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement