Advertisement
Dgame321

Untitled

Nov 20th, 2019
6,844
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.13 KB | None | 0 0
  1. using System;
  2. using System.ComponentModel;
  3. using System.Configuration;
  4. using System.Diagnostics;
  5. using System.Drawing;
  6. using System.Management;
  7. using System.Reflection;
  8. using System.Runtime.InteropServices;
  9. using System.Security;
  10. using System.Security.Cryptography;
  11. using System.Text;
  12. using System.Threading;
  13. using System.Windows.Forms;
  14. using Axenta;
  15. using Newtonsoft.Json;
  16. using xNet;
  17.  
  18. namespace E.X.O.D.U.S
  19. {
  20. // Token: 0x02000002 RID: 2
  21. public partial class LoginGUI : Form
  22. {
  23. // Token: 0x06000002 RID: 2
  24. [DllImport("user32.dll")]
  25. public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
  26.  
  27. // Token: 0x06000003 RID: 3
  28. [DllImport("user32.dll")]
  29. public static extern bool ReleaseCapture();
  30.  
  31. // Token: 0x17000001 RID: 1
  32. // (get) Token: 0x06000004 RID: 4 RVA: 0x00002057 File Offset: 0x00000257
  33. protected override CreateParams CreateParams
  34. {
  35. get
  36. {
  37. CreateParams createParams = base.CreateParams;
  38. createParams.Style |= 131072;
  39. createParams.ClassStyle |= 8;
  40. return createParams;
  41. }
  42. }
  43.  
  44. // Token: 0x06000005 RID: 5 RVA: 0x00002E08 File Offset: 0x00001008
  45. private static void kek()
  46. {
  47. using (HttpRequest httpRequest = new HttpRequest())
  48. {
  49. if (httpRequest.Get("https://pastebin.com/rZeQAV68", null).ToString() != "0")
  50. {
  51. Environment.Exit(0);
  52. }
  53. }
  54. }
  55.  
  56. // Token: 0x06000006 RID: 6 RVA: 0x0000207F File Offset: 0x0000027F
  57. public LoginGUI(string[] args)
  58. {
  59. this.args = args;
  60. this.InitializeComponent();
  61. LoginGUI.qzdq = this;
  62. this.DoubleBuffered = true;
  63. }
  64.  
  65. // Token: 0x06000007 RID: 7 RVA: 0x000020A1 File Offset: 0x000002A1
  66. private void button1_Click(object sender, EventArgs e)
  67. {
  68. base.WindowState = FormWindowState.Minimized;
  69. }
  70.  
  71. // Token: 0x06000008 RID: 8 RVA: 0x000020AA File Offset: 0x000002AA
  72. private void closeButton_Click(object sender, EventArgs e)
  73. {
  74. Application.Exit();
  75. }
  76.  
  77. // Token: 0x06000009 RID: 9 RVA: 0x000020B1 File Offset: 0x000002B1
  78. private void titleLabel_MouseDown(object sender, MouseEventArgs e)
  79. {
  80. if (e.Button == MouseButtons.Left)
  81. {
  82. LoginGUI.ReleaseCapture();
  83. LoginGUI.SendMessage(base.Handle, 161, 2, 0);
  84. }
  85. }
  86.  
  87. // Token: 0x0600000A RID: 10 RVA: 0x000020D9 File Offset: 0x000002D9
  88. private void titleLabel_Click(object sender, EventArgs e)
  89. {
  90. }
  91.  
  92. // Token: 0x0600000B RID: 11 RVA: 0x000020DB File Offset: 0x000002DB
  93. private void licenseKeyTextBox_Enter(object sender, EventArgs e)
  94. {
  95. if (this.emailTextBox.Text == "Username ...")
  96. {
  97. this.emailTextBox.ForeColor = Color.FromArgb(69, 69, 69);
  98. this.emailTextBox.Text = "";
  99. }
  100. }
  101.  
  102. // Token: 0x0600000C RID: 12 RVA: 0x00002E5C File Offset: 0x0000105C
  103. private void licenseKeyTextBox_Leave(object sender, EventArgs e)
  104. {
  105. if (this.emailTextBox.Text == "")
  106. {
  107. this.emailTextBox.ForeColor = Color.FromArgb(136, 136, 136);
  108. this.emailTextBox.Text = "Username ...";
  109. }
  110. }
  111.  
  112. // Token: 0x0600000D RID: 13 RVA: 0x00002EB0 File Offset: 0x000010B0
  113. private void textBox1_Leave(object sender, EventArgs e)
  114. {
  115. if (this.passwordTextBox.Text == "")
  116. {
  117. this.passwordTextBox.ForeColor = Color.FromArgb(136, 136, 136);
  118. this.passwordTextBox.Text = "Password ...";
  119. }
  120. }
  121.  
  122. // Token: 0x0600000E RID: 14 RVA: 0x0000211A File Offset: 0x0000031A
  123. private void textBox1_Enter(object sender, EventArgs e)
  124. {
  125. if (this.passwordTextBox.Text == "Password ...")
  126. {
  127. this.passwordTextBox.ForeColor = Color.FromArgb(69, 69, 69);
  128. this.passwordTextBox.Text = "";
  129. }
  130. }
  131.  
  132. // Token: 0x0600000F RID: 15 RVA: 0x00002159 File Offset: 0x00000359
  133. private void closeButton_Click_1(object sender, EventArgs e)
  134. {
  135. Environment.Exit(0);
  136. }
  137.  
  138. // Token: 0x06000010 RID: 16 RVA: 0x00002161 File Offset: 0x00000361
  139. private void validateLicenseButton_Click_1(object sender, EventArgs e)
  140. {
  141. this.validateLicenseButton.Text = "Connecting ...";
  142. new Thread(delegate()
  143. {
  144. foreach (Process process in Process.GetProcesses())
  145. {
  146. if (process.ProcessName.ToLower().Contains("fiddler") || process.ProcessName.ToLower().Contains("dnSpy") || process.ProcessName.ToLower().Contains("postman"))
  147. {
  148. Environment.Exit(0);
  149. }
  150. }
  151. if (this.checkBox1.Checked)
  152. {
  153. Configuration configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
  154. configuration.AppSettings.Settings.Remove("Username");
  155. configuration.AppSettings.Settings.Add("Username", this.emailTextBox.Text);
  156. configuration.AppSettings.Settings.Remove("Password");
  157. configuration.AppSettings.Settings.Add("Password", LoginGUI.EncryptString(LoginGUI.ToSecureString(this.passwordTextBox.Text)));
  158. configuration.Save(ConfigurationSaveMode.Modified);
  159. ConfigurationManager.RefreshSection("appSettings");
  160. }
  161. else
  162. {
  163. Configuration configuration2 = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
  164. configuration2.AppSettings.Settings.Remove("Username");
  165. configuration2.AppSettings.Settings.Add("Username", null);
  166. configuration2.AppSettings.Settings.Remove("Password");
  167. configuration2.AppSettings.Settings.Add("Password", null);
  168. configuration2.Save(ConfigurationSaveMode.Modified);
  169. ConfigurationManager.RefreshSection("appSettings");
  170. }
  171. try
  172. {
  173. using (HttpRequest httpRequest = new HttpRequest())
  174. {
  175. Structs.LoginStruct loginStruct = default(Structs.LoginStruct);
  176. loginStruct.email = this.emailTextBox.Text;
  177. loginStruct.password = this.passwordTextBox.Text;
  178. string text = string.Empty;
  179. using (ManagementObjectCollection.ManagementObjectEnumerator enumerator = new ManagementClass("win32_processor").GetInstances().GetEnumerator())
  180. {
  181. if (enumerator.MoveNext())
  182. {
  183. text = ((ManagementObject)enumerator.Current).Properties["processorID"].Value.ToString();
  184. }
  185. }
  186. loginStruct.HWID = text;
  187. string str = string.Concat(new string[]
  188. {
  189. "email=",
  190. loginStruct.email,
  191. "&password=",
  192. loginStruct.password,
  193. "&HWID=",
  194. text
  195. });
  196. string text2 = httpRequest.Post("https://axenta.ddns.net:7000/users", str, "application/x-www-form-urlencoded").ToString();
  197. if (text2.Contains("Bad"))
  198. {
  199. this.label1.Text = "Wrong email / password.";
  200. this.validateLicenseButton.Text = "Connect";
  201. }
  202. if (text2.Contains("HWID"))
  203. {
  204. this.label1.Text = "This account is linked to another PC.";
  205. this.validateLicenseButton.Text = "Connect";
  206. }
  207. if (text2.Contains("Connection valid."))
  208. {
  209. SynchronizedInvoker.Invoke(delegate
  210. {
  211. MessageBox.Show(this, "Welcome to Axenta, " + this.emailTextBox.Text + "\r\n\r\nYou should join our discord :)\n\nThis program is purely a demonstration of the use/flaws of the fortnite API\nUse this solely for testing purpose, credential stuffing is forbidden !\n\nI can't be held responsible for shit you do.", "Welcome.", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  212. });
  213. this.FuckCrossThread(text2);
  214. }
  215. }
  216. }
  217. catch (Exception ex)
  218. {
  219. throw ex;
  220. }
  221. }).Start();
  222. }
  223.  
  224. // Token: 0x06000011 RID: 17 RVA: 0x00002F04 File Offset: 0x00001104
  225. private void FuckCrossThread(string answer)
  226. {
  227. if (LoginGUI.qzdq.InvokeRequired)
  228. {
  229. LoginGUI.qzdq.Invoke(new LoginGUI.Del(this.FuckCrossThread), new object[]
  230. {
  231. answer
  232. });
  233. return;
  234. }
  235. LoginGUI.qzdq.Visible = false;
  236. new Main(JsonConvert.DeserializeObject(answer), this.emailTextBox.Text, LoginGUI.ToSecureString(this.passwordTextBox.Text), this, this.args).Show();
  237. }
  238.  
  239. // Token: 0x06000012 RID: 18 RVA: 0x00002F7C File Offset: 0x0000117C
  240. private void LoginGUI_Load(object sender, EventArgs e)
  241. {
  242. new Main(JsonConvert.DeserializeObject(sender), this.emailTextBox.Text, LoginGUI.ToSecureString(this.passwordTextBox.Text), this, this.args).Show();
  243. return;
  244. try
  245. {
  246. }
  247. catch (Exception)
  248. {
  249. Environment.Exit(0);
  250. }
  251. finally
  252. {
  253. HttpRequest httpRequest;
  254. if (httpRequest != null)
  255. {
  256. ((IDisposable)httpRequest).Dispose();
  257. }
  258. }
  259. string text = "";
  260. Console.WriteLine("Checking for new version ...");
  261. try
  262. {
  263. using (HttpRequest httpRequest2 = new HttpRequest())
  264. {
  265. text = httpRequest2.Get("https://axenta.ddns.net:7000/latest", null).ToString();
  266. }
  267. }
  268. catch (Exception)
  269. {
  270. Console.WriteLine("Couldn't contact release server.");
  271. Console.Read();
  272. Environment.Exit(0);
  273. }
  274. Version version = Assembly.GetExecutingAssembly().GetName().Version;
  275. Version v = new Version(text);
  276. if (!(version < v))
  277. {
  278. goto IL_1B0;
  279. }
  280. try
  281. {
  282. Process.Start("AxentaUpdater.exe");
  283. base.Close();
  284. goto IL_1CA;
  285. }
  286. catch (Exception)
  287. {
  288. MessageBox.Show(this, string.Concat(new string[]
  289. {
  290. "A new update is released (",
  291. text,
  292. ")",
  293. Environment.NewLine,
  294. Environment.NewLine,
  295. "Run the updater as soon as possible, changelog is available on discord."
  296. }), "Axenta - New update available", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  297. goto IL_1CA;
  298. }
  299. IL_1B0:
  300. Console.WriteLine("Version V" + version.ToString() + " is up to date.");
  301. IL_1CA:
  302. this.passwordTextBox.PasswordChar = '*';
  303. this.textBox3.PasswordChar = '*';
  304. this.textBox1.PasswordChar = '*';
  305. if (!(ConfigurationManager.AppSettings["Password"] != "") || !(ConfigurationManager.AppSettings["Username"] != ""))
  306. {
  307. goto IL_279;
  308. }
  309. SecureString input = LoginGUI.DecryptString(ConfigurationManager.AppSettings["Password"]);
  310. string text2 = ConfigurationManager.AppSettings["Username"];
  311. this.passwordTextBox.Text = LoginGUI.ToInsecureString(input);
  312. this.emailTextBox.Text = text2;
  313. this.checkBox1.Checked = true;
  314. IL_279:;
  315. }
  316.  
  317. // Token: 0x06000013 RID: 19 RVA: 0x00002189 File Offset: 0x00000389
  318. private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  319. {
  320. if (!this.panel1.Visible)
  321. {
  322. this.panel1.Visible = true;
  323. this.loginPanel.Visible = false;
  324. }
  325. }
  326.  
  327. // Token: 0x06000014 RID: 20 RVA: 0x000020D9 File Offset: 0x000002D9
  328. private void titleLabel_Click_1(object sender, EventArgs e)
  329. {
  330. }
  331.  
  332. // Token: 0x06000015 RID: 21 RVA: 0x000021B0 File Offset: 0x000003B0
  333. private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
  334. {
  335. if (this.panel1.Visible)
  336. {
  337. this.panel1.Visible = false;
  338. this.loginPanel.Visible = true;
  339. }
  340. }
  341.  
  342. // Token: 0x06000016 RID: 22 RVA: 0x00003244 File Offset: 0x00001444
  343. private void button2_Click(object sender, EventArgs e)
  344. {
  345. if (this.textBox3.Text.Length < 5)
  346. {
  347. MessageBox.Show(this, "Password must be longer than 5 characters.", "Password too short.", MessageBoxButtons.OK, MessageBoxIcon.Hand);
  348. return;
  349. }
  350. try
  351. {
  352. using (HttpRequest httpRequest = new HttpRequest())
  353. {
  354. Structs.LoginStruct loginStruct = default(Structs.LoginStruct);
  355. loginStruct.email = this.textBox2.Text;
  356. loginStruct.password = this.textBox1.Text;
  357. string text = string.Empty;
  358. using (ManagementObjectCollection.ManagementObjectEnumerator enumerator = new ManagementClass("win32_processor").GetInstances().GetEnumerator())
  359. {
  360. if (enumerator.MoveNext())
  361. {
  362. text = ((ManagementObject)enumerator.Current).Properties["processorID"].Value.ToString();
  363. }
  364. }
  365. loginStruct.HWID = text;
  366. string str = string.Concat(new string[]
  367. {
  368. "email=",
  369. loginStruct.email,
  370. "&password=",
  371. loginStruct.password,
  372. "&newPassword=",
  373. this.textBox3.Text,
  374. "&HWID=",
  375. text
  376. });
  377. string text2 = httpRequest.Post("https://axenta.ddns.net:7000/updatePassword", str, "application/x-www-form-urlencoded").ToString();
  378. if (text2.Contains("Bad"))
  379. {
  380. this.label2.Text = "Wrong email / password.";
  381. }
  382. if (text2.Contains("Password changed."))
  383. {
  384. MessageBox.Show(this, "Your password has been succesfully changed.", "Password changed.", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  385. }
  386. if (text2.Contains("HWID"))
  387. {
  388. this.label2.Text = "This account is linked to another PC.";
  389. }
  390. }
  391. }
  392. catch (Exception)
  393. {
  394. MessageBox.Show(this, "Couldn't contact the server, ask @Kadau5#6292 on discord if it's up.", "Invictus - Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
  395. }
  396. }
  397.  
  398. // Token: 0x06000017 RID: 23 RVA: 0x000020D9 File Offset: 0x000002D9
  399. private void panel1_Paint(object sender, PaintEventArgs e)
  400. {
  401. }
  402.  
  403. // Token: 0x06000018 RID: 24 RVA: 0x000020D9 File Offset: 0x000002D9
  404. private void panel3_Paint(object sender, PaintEventArgs e)
  405. {
  406. }
  407.  
  408. // Token: 0x06000019 RID: 25 RVA: 0x000021D7 File Offset: 0x000003D7
  409. public static string EncryptString(SecureString input)
  410. {
  411. return Convert.ToBase64String(ProtectedData.Protect(Encoding.Unicode.GetBytes(LoginGUI.ToInsecureString(input)), LoginGUI.entropy, DataProtectionScope.CurrentUser));
  412. }
  413.  
  414. // Token: 0x0600001A RID: 26 RVA: 0x00003444 File Offset: 0x00001644
  415. public static SecureString DecryptString(string encryptedData)
  416. {
  417. SecureString result;
  418. try
  419. {
  420. byte[] bytes = ProtectedData.Unprotect(Convert.FromBase64String(encryptedData), LoginGUI.entropy, DataProtectionScope.CurrentUser);
  421. result = LoginGUI.ToSecureString(Encoding.Unicode.GetString(bytes));
  422. }
  423. catch
  424. {
  425. result = new SecureString();
  426. }
  427. return result;
  428. }
  429.  
  430. // Token: 0x0600001B RID: 27 RVA: 0x00003490 File Offset: 0x00001690
  431. public static SecureString ToSecureString(string input)
  432. {
  433. SecureString secureString = new SecureString();
  434. foreach (char c in input)
  435. {
  436. secureString.AppendChar(c);
  437. }
  438. secureString.MakeReadOnly();
  439. return secureString;
  440. }
  441.  
  442. // Token: 0x0600001C RID: 28 RVA: 0x000034CC File Offset: 0x000016CC
  443. public static string ToInsecureString(SecureString input)
  444. {
  445. string result = string.Empty;
  446. IntPtr intPtr = Marshal.SecureStringToBSTR(input);
  447. try
  448. {
  449. result = Marshal.PtrToStringBSTR(intPtr);
  450. }
  451. finally
  452. {
  453. Marshal.ZeroFreeBSTR(intPtr);
  454. }
  455. return result;
  456. }
  457.  
  458. // Token: 0x0600001D RID: 29 RVA: 0x000020D9 File Offset: 0x000002D9
  459. private void loginPanel_Paint(object sender, PaintEventArgs e)
  460. {
  461. }
  462.  
  463. // Token: 0x04000001 RID: 1
  464. public const int WM_NCLBUTTONDOWN = 161;
  465.  
  466. // Token: 0x04000002 RID: 2
  467. public const int HT_CAPTION = 2;
  468.  
  469. // Token: 0x04000003 RID: 3
  470. private static byte[] entropy = Encoding.Unicode.GetBytes("Salt Is Not A Password");
  471.  
  472. // Token: 0x04000004 RID: 4
  473. private const int WS_MINIMIZEBOX = 131072;
  474.  
  475. // Token: 0x04000005 RID: 5
  476. private const int CS_DBLCLKS = 8;
  477.  
  478. // Token: 0x04000006 RID: 6
  479. private string[] args;
  480.  
  481. // Token: 0x04000007 RID: 7
  482. private static Form qzdq;
  483.  
  484. // Token: 0x02000003 RID: 3
  485. // (Invoke) Token: 0x06000025 RID: 37
  486. private delegate void Del(string answer);
  487. }
  488. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement