Guest User

Untitled

a guest
Feb 28th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.30 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using MetroFramework.Forms;
  11. using System.Threading;
  12. using System.Net;
  13. using System.Security;
  14. using System.IO;
  15. using System.Collections;
  16. using System.Runtime.InteropServices;
  17. using System.Security.Cryptography;
  18.  
  19. // 284, 261
  20.  
  21. namespace MetroLoader
  22. {
  23. public partial class Form4 : MetroForm
  24. {
  25.  
  26. bool admin;
  27. bool premium;
  28. public string fileEncrypt;
  29. public string fileDecrypt;
  30. public string outputEncrypt;
  31. public string outputDecrypt;
  32. public int numPass = 10;
  33. const int keysize = 256;
  34. const string initVector = "Exm4ypIEs2owh8bB";
  35. SecureString pwd = new SecureString();
  36.  
  37.  
  38. public Form4()
  39. {
  40. InitializeComponent();
  41. }
  42.  
  43. private void Form4_Load(object sender, EventArgs e)
  44. {
  45. webBrowser1.Navigate("http://wrs-cheats.ga/loader2/group.php?username=" + Properties.Settings.Default.Username);
  46. metroButton1.Enabled = false;
  47. metroRadioButton2.Visible = false;
  48. }
  49.  
  50. private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
  51. {
  52. if (webBrowser1.DocumentText.Contains("4"))
  53. {
  54. admin = true;
  55. metroButton1.Enabled = true;
  56. metroLabel1.Text = "User status: Admin";
  57. metroRadioButton2.Visible = true;
  58. }
  59. else if (webBrowser1.DocumentText.Contains("8"))
  60. {
  61. premium = true;
  62. metroButton1.Enabled = true;
  63. metroLabel1.Text = "User status: Premium";
  64. }
  65.  
  66. Thread.Sleep(1000);
  67. timer1.Stop();
  68. }
  69.  
  70. private void timer1_Tick(object sender, EventArgs e)
  71. {
  72. if (admin == true)
  73. {
  74. metroRadioButton2.Visible = true;
  75. }
  76. }
  77.  
  78. // Get the path for decryption
  79. public void decryptFilePath(string path)
  80. {
  81. string[] breakup = path.Split('\\');
  82. int length = breakup.Length;
  83. string[] period = breakup[length - 1].Split('-');
  84. string output = period[0] + "-decrypt.txt";
  85. string finalpath = "";
  86. for (int i = 0; i < breakup.Length - 1; i++)
  87. {
  88. if (i == 0)
  89. {
  90. finalpath = breakup[0];
  91. }
  92. else
  93. {
  94. finalpath = finalpath + "\\" + breakup[i];
  95. }
  96. }
  97. outputDecrypt = "C:\\test-decrypt.txt";
  98. }
  99.  
  100. // Actual decryption
  101. public void decryptFile()
  102. {
  103. String line;
  104. StreamWriter sw = new StreamWriter(outputDecrypt);
  105. ArrayList d1 = new ArrayList();
  106. ArrayList d2 = new ArrayList();
  107. IntPtr ptr = IntPtr.Zero;
  108. ptr = Marshal.SecureStringToBSTR(pwd);
  109. string hash = getPasswordHash(Marshal.PtrToStringBSTR(ptr));
  110. try
  111. {
  112. StreamReader sr = new StreamReader(fileDecrypt);
  113. while ((line = sr.ReadLine()) != null)
  114. {
  115. d2.Add(line);
  116. }
  117.  
  118. for (int i = 0; i < numPass; i++)
  119. {
  120. foreach (string s1 in d2)
  121. {
  122. d1.Add(decrypt(s1, hash));
  123. }
  124. d2.Clear();
  125. foreach (string s2 in d1)
  126. {
  127. d2.Add(decrypt(s2, hash));
  128. }
  129. d1.Clear();
  130. }
  131.  
  132. foreach (string dec in d2)
  133. {
  134. sw.WriteLine(decrypt(dec, hash));
  135. }
  136. sw.Close();
  137. }
  138. catch (Exception f)
  139. {
  140. string error = f.ToString();
  141. sw.Close();
  142. d1.Clear();
  143. d2.Clear();
  144. WrongPwd pwdIncorrect = new WrongPwd();
  145. pwdIncorrect.Show();
  146. File.Delete(outputDecrypt);
  147. }
  148. }
  149.  
  150. public static string decrypt(string cipherText, string passPhrase)
  151. {
  152. byte[] initVectorBytes = Encoding.ASCII.GetBytes(initVector);
  153. byte[] cipherTextBytes = Convert.FromBase64String(cipherText);
  154. PasswordDeriveBytes password = new PasswordDeriveBytes(passPhrase, null);
  155. byte[] keyBytes = password.GetBytes(keysize / 8);
  156. RijndaelManaged symmetricKey = new RijndaelManaged();
  157. symmetricKey.Padding = PaddingMode.ISO10126;
  158. symmetricKey.Mode = CipherMode.CBC;
  159. ICryptoTransform decryptor = symmetricKey.CreateDecryptor(keyBytes, initVectorBytes);
  160. MemoryStream memoryStream = new MemoryStream(cipherTextBytes);
  161. CryptoStream cryptoStream = new CryptoStream(memoryStream, decryptor, CryptoStreamMode.Read);
  162. byte[] plainTextBytes = new byte[cipherTextBytes.Length];
  163. int decryptedByteCount = cryptoStream.Read(plainTextBytes, 0, plainTextBytes.Length);
  164. memoryStream.Close();
  165. cryptoStream.Close();
  166. return Encoding.UTF8.GetString(plainTextBytes, 0, decryptedByteCount);
  167. }
  168.  
  169.  
  170.  
  171. public string getPasswordHash(string pwd)
  172. {
  173. MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
  174. byte[] src;
  175. byte[] hash;
  176. src = ASCIIEncoding.ASCII.GetBytes(pwd);
  177. hash = md5.ComputeHash(src);
  178. StringBuilder output = new StringBuilder(hash.Length);
  179. for (int i = 0; i < hash.Length; i++)
  180. {
  181. output.Append(hash[i].ToString("X2"));
  182. }
  183. return output.ToString();
  184. }
  185.  
  186.  
  187.  
  188.  
  189. private void metroButton1_Click(object sender, EventArgs e)
  190. {
  191.  
  192. if (metroRadioButton1.Checked == true) // Premium
  193. {
  194. WebClient wb = new WebClient();
  195. wb.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.33 Safari/537.36");
  196. wb.DownloadFile("http://wrs-cheats.ga/loader2/wrs.dll", "C:\\wrs\\wrs.dll");
  197. }
  198.  
  199. if (metroRadioButton2.Checked == true) // Developer
  200. {
  201. WebClient wb = new WebClient();
  202. wb.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.33 Safari/537.36");
  203. wb.DownloadFile("http://wrs-cheats.ga/loader2/wrs.dll", "C:\\wrs\\wrs2.dll");
  204. }
  205.  
  206. this.Hide();
  207. var form2 = new Form2();
  208. form2.Closed += (s, args) => this.Close();
  209. form2.Show();
  210.  
  211. // Decryption start
  212.  
  213. string filename = @"â€ȘC:\Users\prefo\Desktop\test-encrypt.txt";
  214. if (filename.Equals(""))
  215. {
  216. MessageBox.Show("File missing");
  217. }
  218. else
  219. {
  220. decryptFilePath(filename);
  221. EnterPassword enterPass = new EnterPassword();
  222. if (enterPass.ShowDialog() == DialogResult.OK)
  223. {
  224. pwd = enterPass.getPassword();
  225. decryptFile();
  226. }
  227. }
  228. }
  229. }
  230. }
  231.  
  232. //-----------------------------------------------------
  233. // Coded by /id/Thaisen! Free loader source
  234. // https://github.com/ThaisenPM/Cheat-Loader-CSGO-2.0
  235. // Note to the person using this, removing this
  236. // text is in violation of the license you agreed
  237. // to by downloading. Only you can see this so what
  238. // does it matter anyways.
  239. // Copyright © ThaisenPM 2017
  240. // Licensed under a MIT license
  241. // Read the terms of the license here
  242. // https://github.com/ThaisenPM/Cheat-Loader-CSGO-2.0/blob/master/LICENSE
  243. //-----------------------------------------------------
Add Comment
Please, Sign In to add comment