// Token: 0x06000040 RID: 64 RVA: 0x00002B1C File Offset: 0x00000D1C public static void Log(string username, string action) { bool flag = !Constants.Initialized; if (flag) { MessageBox.Show("Please initialize your application first!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); } bool flag2 = string.IsNullOrWhiteSpace(action); if (flag2) { MessageBox.Show("Missing log information!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); } string[] array = new string[0]; using (WebClient webClient = new WebClient()) { try { Security.Start(); webClient.Proxy = null; Encoding @default = Encoding.Default; WebClient webClient2 = webClient; string apiUrl = Constants.ApiUrl; NameValueCollection nameValueCollection = new NameValueCollection(); nameValueCollection["token"] = Encryption.EncryptService(Constants.Token); nameValueCollection["aid"] = Encryption.APIService(OnProgramStart.AID); nameValueCollection["username"] = Encryption.APIService(username); nameValueCollection["pcuser"] = Encryption.APIService(Environment.UserName); nameValueCollection["session_id"] = Constants.IV; nameValueCollection["api_id"] = Constants.APIENCRYPTSALT; nameValueCollection["api_key"] = Constants.APIENCRYPTKEY; nameValueCollection["data"] = Encryption.APIService(action); nameValueCollection["session_key"] = Constants.Key; nameValueCollection["secret"] = Encryption.APIService(OnProgramStart.Secret); nameValueCollection["type"] = Encryption.APIService("log"); array = Encryption.DecryptService(@default.GetString(webClient2.UploadValues(apiUrl, nameValueCollection))).Split("|".ToCharArray()); Security.End(); } catch (Exception ex) { MessageBox.Show(ex.Message, OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); } } }
public static void Log(string username, string action) { if (!Constants.Initialized) { MessageBox.Show("Please initialize your application first!"); Process.GetCurrentProcess().Kill(); } if (string.IsNullOrWhiteSpace(action)) { MessageBox.Show("Missing log information!"); Process.GetCurrentProcess().Kill(); } string[] response = new string[] { }; using (WebClient wc = new WebClient()) { try { Security.Start(); wc.Proxy = null; response = (Encryption.DecryptService(Encoding.Default.GetString(wc.UploadValues(Constants.ApiUrl, new NameValueCollection { ["token"] = Encryption.EncryptService(Constants.Token), ["aid"] = Encryption.APIService(OnProgramStart.AID), ["username"] = Encryption.APIService(username), ["pcuser"] = Encryption.APIService(Environment.UserName), ["session_id"] = Constants.IV, ["api_id"] = Constants.APIENCRYPTSALT, ["api_key"] = Constants.APIENCRYPTKEY, ["data"] = Encryption.APIService(action), ["session_key"] = Constants.Key, ["secret"] = Encryption.APIService(OnProgramStart.Secret), ["type"] = Encryption.APIService("log") }))).Split("|".ToCharArray())); Security.End(); } catch (Exception ex) { MessageBox.Show(ex.Message); Process.GetCurrentProcess().Kill(); } } }
// Token: 0x0600003D RID: 61 RVA: 0x000025E0 File Offset: 0x000007E0 public static void Initialize(string name, string aid, string secret, string version) { bool flag = string.IsNullOrWhiteSpace(name) || string.IsNullOrWhiteSpace(aid) || string.IsNullOrWhiteSpace(secret) || string.IsNullOrWhiteSpace(version); if (flag) { MessageBox.Show("Invalid application information!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); } OnProgramStart.AID = aid; OnProgramStart.Secret = secret; OnProgramStart.Version = version; OnProgramStart.Name = name; string[] array = new string[0]; using (WebClient webClient = new WebClient()) { try { webClient.Proxy = null; Security.Start(); Encoding @default = Encoding.Default; WebClient webClient2 = webClient; string apiUrl = Constants.ApiUrl; NameValueCollection nameValueCollection = new NameValueCollection(); nameValueCollection["token"] = Encryption.EncryptService(Constants.Token); nameValueCollection["timestamp"] = Encryption.EncryptService(DateTime.Now.ToString()); nameValueCollection["aid"] = Encryption.APIService(OnProgramStart.AID); nameValueCollection["session_id"] = Constants.IV; nameValueCollection["api_id"] = Constants.APIENCRYPTSALT; nameValueCollection["api_key"] = Constants.APIENCRYPTKEY; nameValueCollection["session_key"] = Constants.Key; nameValueCollection["secret"] = Encryption.APIService(OnProgramStart.Secret); nameValueCollection["type"] = Encryption.APIService("start"); array = Encryption.DecryptService(@default.GetString(webClient2.UploadValues(apiUrl, nameValueCollection))).Split("|".ToCharArray()); bool flag2 = Security.MaliciousCheck(array[1]); if (flag2) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Exclamation); Process.GetCurrentProcess().Kill(); } bool breached = Constants.Breached; if (breached) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Exclamation); Process.GetCurrentProcess().Kill(); } bool flag3 = array[0] != Constants.Token; if (flag3) { MessageBox.Show("Security error has been triggered!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); } string text = array[2]; string text2 = text; if (text2 != null) { if (!(text2 == "success")) { if (text2 == "binderror") { MessageBox.Show(Encryption.Decode("RmFpbGVkIHRvIGJpbmQgdG8gc2VydmVyLCBjaGVjayB5b3VyIEFJRCAmIFNlY3JldCBpbiB5b3VyIGNvZGUh"), OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); return; } if (text2 == "banned") { MessageBox.Show("This application has been banned for violating the TOS" + Environment.NewLine + "Contact us at [email protected]", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); return; } } else { Constants.Initialized = true; bool flag4 = array[3] == "Enabled"; if (flag4) { ApplicationSettings.Status = true; } bool flag5 = array[4] == "Enabled"; if (flag5) { ApplicationSettings.DeveloperMode = true; } ApplicationSettings.Hash = array[5]; ApplicationSettings.Version = array[6]; ApplicationSettings.Update_Link = array[7]; bool flag6 = array[8] == "Enabled"; if (flag6) { ApplicationSettings.Freemode = true; } bool flag7 = array[9] == "Enabled"; if (flag7) { ApplicationSettings.Login = true; } ApplicationSettings.Name = array[10]; bool flag8 = array[11] == "Enabled"; if (flag8) { ApplicationSettings.Register = true; } bool developerMode = ApplicationSettings.DeveloperMode; if (developerMode) { MessageBox.Show("Application is in Developer Mode, bypassing integrity and update check!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Exclamation); File.Create(Environment.CurrentDirectory + "/integrity.log").Close(); string contents = Security.Integrity(Process.GetCurrentProcess().MainModule.FileName); File.WriteAllText(Environment.CurrentDirectory + "/integrity.log", contents); MessageBox.Show("Your applications hash has been saved to integrity.txt, please refer to this when your application is ready for release!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Asterisk); } else { bool flag9 = array[12] == "Enabled"; if (flag9) { bool flag10 = ApplicationSettings.Hash != Security.Integrity(Process.GetCurrentProcess().MainModule.FileName); if (flag10) { MessageBox.Show("File has been tampered with, couldn't verify integrity!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); } } bool flag11 = ApplicationSettings.Version != OnProgramStart.Version; if (flag11) { MessageBox.Show("Update " + ApplicationSettings.Version + " available, redirecting to update!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.Start(ApplicationSettings.Update_Link); Process.GetCurrentProcess().Kill(); } } bool flag12 = !ApplicationSettings.Status; if (flag12) { MessageBox.Show("Looks like this application is disabled, please try again later!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); } } } Security.End(); } catch (Exception ex) { MessageBox.Show(ex.Message, OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); } } }
public static bool ExtendSubscription(string username, string password, string license) { if (!Constants.Initialized) { MessageBox.Show("Please initialize your application first!"); Security.End(); Process.GetCurrentProcess().Kill(); } if (string.IsNullOrWhiteSpace(username) || string.IsNullOrWhiteSpace(password) || string.IsNullOrWhiteSpace(license)) { MessageBox.Show("Invalid registrar information!"); Process.GetCurrentProcess().Kill(); } string[] response = new string[] { }; using (WebClient wc = new WebClient()) { try { Security.Start(); wc.Proxy = null; response = Encryption.DecryptService(Encoding.Default.GetString(wc.UploadValues(Constants.ApiUrl, new NameValueCollection { ["token"] = Encryption.EncryptService(Constants.Token), ["timestamp"] = Encryption.EncryptService(DateTime.Now.ToString()), ["aid"] = Encryption.APIService(OnProgramStart.AID), ["session_id"] = Constants.IV, ["api_id"] = Constants.APIENCRYPTSALT, ["api_key"] = Constants.APIENCRYPTKEY, ["session_key"] = Constants.Key, ["secret"] = Encryption.APIService(OnProgramStart.Secret), ["type"] = Encryption.APIService("extend"), ["username"] = Encryption.APIService(username), ["password"] = Encryption.APIService(password), ["license"] = Encryption.APIService(license), }))).Split("|".ToCharArray()); if (response[0] != Constants.Token) { MessageBox.Show("Security error has been triggered!"); Security.End(); Process.GetCurrentProcess().Kill(); } if (Security.MaliciousCheck(response[1])) { MessageBox.Show("Possible malicious activity detected!"); Process.GetCurrentProcess().Kill(); } if (Constants.Breached) { MessageBox.Show("Possible malicious activity detected!"); Process.GetCurrentProcess().Kill(); } switch (response[2]) { case "success": Security.End(); return(true); case "invalid_token": MessageBox.Show("Token does not exist!"); Security.End(); return(false); case "invalid_details": MessageBox.Show("Your user details are invalid!"); Security.End(); return(false); } } catch (Exception ex) { MessageBox.Show(ex.Message); Process.GetCurrentProcess().Kill(); } return(false); } }
public static bool Login(string password) { if (!Constants.Initialized) { MessageBox.Show("Please initialize your application first!"); Process.GetCurrentProcess().Kill(); } // if (string.IsNullOrWhiteSpace(username)) if (string.IsNullOrWhiteSpace(password)) { MessageBox.Show("Please enter a Valid Key"); Process.GetCurrentProcess().Kill(); } string[] response = new string[] { }; using (WebClient wc = new WebClient()) { try { Security.Start(); wc.Proxy = null; response = (Encryption.DecryptService(Encoding.Default.GetString(wc.UploadValues(Constants.ApiUrl, new NameValueCollection { ["token"] = Encryption.EncryptService(Constants.Token), ["timestamp"] = Encryption.EncryptService(DateTime.Now.ToString()), ["aid"] = Encryption.APIService(OnProgramStart.AID), ["session_id"] = Constants.IV, ["api_id"] = Constants.APIENCRYPTSALT, ["api_key"] = Constants.APIENCRYPTKEY, ["username"] = Encryption.APIService(password), ["password"] = Encryption.APIService(password), ["hwid"] = Encryption.APIService(Constants.HWID()), ["session_key"] = Constants.Key, ["secret"] = Encryption.APIService(OnProgramStart.Secret), ["type"] = Encryption.APIService("login") }))).Split("|".ToCharArray())); if (response[0] != Constants.Token) { MessageBox.Show("Security error has been triggered!"); Process.GetCurrentProcess().Kill(); } if (Security.MaliciousCheck(response[1])) { MessageBox.Show("Possible malicious activity detected!"); Process.GetCurrentProcess().Kill(); } if (Constants.Breached) { MessageBox.Show("Possible malicious activity detected!"); Process.GetCurrentProcess().Kill(); } switch (response[2]) { case "success": User.ID = response[3]; User.Username = response[4]; User.Password = response[5]; User.Email = response[6]; User.HWID = response[7]; User.UserVariable = response[8]; User.Rank = response[9]; User.IP = response[10]; User.Expiry = response[11]; User.LastLogin = response[12]; User.RegisterDate = response[13]; string Variables = response[14]; foreach (string var in Variables.Split('~')) { string[] items = var.Split('^'); try { App.Variables.Add(items[0], items[1]); } catch { //If some are null or not loaded, just ignore. //Error will be shown when loading the variable anyways } } Security.End(); return(true); case "invalid_details": MessageBox.Show("Please enter a valid key"); Security.End(); return(false); case "time_expired": MessageBox.Show("Your key has expired!"); return(false); case "hwid_updated": MessageBox.Show("New machine has been binded, CLICK LOGIN AGAIN!"); Security.End(); return(false); case "invalid_hwid": MessageBox.Show("This key is binded to ip, please contact JOY support!"); Security.End(); return(false); } } catch (Exception ex) { MessageBox.Show(ex.Message); Security.End(); Process.GetCurrentProcess().Kill(); } return(false); } }
public static void Initialize(string name, string aid, string secret, string version) { if (string.IsNullOrWhiteSpace(name) || string.IsNullOrWhiteSpace(aid) || string.IsNullOrWhiteSpace(secret) || string.IsNullOrWhiteSpace(version)) { MessageBox.Show("Invalid application information!"); Process.GetCurrentProcess().Kill(); } AID = aid; Secret = secret; Version = version; Name = name; string[] response = new string[] { }; using (WebClient wc = new WebClient()) { try { wc.Proxy = null; Security.Start(); response = (Encryption.DecryptService(Encoding.Default.GetString(wc.UploadValues(Constants.ApiUrl, new NameValueCollection { ["token"] = Encryption.EncryptService(Constants.Token), ["timestamp"] = Encryption.EncryptService(DateTime.Now.ToString()), ["aid"] = Encryption.APIService(AID), ["session_id"] = Constants.IV, ["api_id"] = Constants.APIENCRYPTSALT, ["api_key"] = Constants.APIENCRYPTKEY, ["session_key"] = Constants.Key, ["secret"] = Encryption.APIService(Secret), ["type"] = Encryption.APIService("start") }))).Split("|".ToCharArray())); if (Security.MaliciousCheck(response[1])) { MessageBox.Show("Possible malicious activity detected!"); Process.GetCurrentProcess().Kill(); } if (Constants.Breached) { MessageBox.Show("Possible malicious activity detected!"); Process.GetCurrentProcess().Kill(); } if (response[0] != Constants.Token) { MessageBox.Show("Security error has been triggered!"); Process.GetCurrentProcess().Kill(); } switch (response[2]) { case "success": Constants.Initialized = true; if (response[3] == "Enabled") { ApplicationSettings.Status = true; } if (response[4] == "Enabled") { ApplicationSettings.DeveloperMode = true; } ApplicationSettings.Hash = response[5]; ApplicationSettings.Version = response[6]; ApplicationSettings.Update_Link = response[7]; if (response[8] == "Enabled") { ApplicationSettings.Freemode = true; } if (response[9] == "Enabled") { ApplicationSettings.Login = true; } ApplicationSettings.Name = response[10]; if (response[11] == "Enabled") { ApplicationSettings.Register = true; } else { if (response[12] == "Enabled") { if (ApplicationSettings.Hash != Security.Integrity(Process.GetCurrentProcess().MainModule.FileName)) { MessageBox.Show($"File has been tampered with, couldn't verify integrity!"); Process.GetCurrentProcess().Kill(); } } if (ApplicationSettings.Version != Version) { MessageBox.Show($"Update {ApplicationSettings.Version} available, redirecting to update!"); Process.Start(ApplicationSettings.Update_Link); Process.GetCurrentProcess().Kill(); } } if (ApplicationSettings.Status == false) { MessageBox.Show("Looks like this application is disabled, please try again later!"); Process.GetCurrentProcess().Kill(); } break; case "binderror": Process.GetCurrentProcess().Kill(); return; case "banned": MessageBox.Show("This application has been banned for violating the TOS" + Environment.NewLine + "Contact us at [email protected]"); Process.GetCurrentProcess().Kill(); return; } Security.End(); } catch (Exception ex) { MessageBox.Show(ex.Message); Process.GetCurrentProcess().Kill(); } } }
public static bool AIORegister(string AIO) { if (!Constants.Initialized) { MessageBox.Show("Please initialize your application first!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Error); Security.End(); Process.GetCurrentProcess().Kill(); } if (string.IsNullOrWhiteSpace(AIO)) { MessageBox.Show("Invalid registrar information!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Error); Process.GetCurrentProcess().Kill(); } string[] response = new string[] { }; using (WebClient wc = new WebClient()) { try { Security.Start(); wc.Proxy = null; response = Encryption.DecryptService(Encoding.Default.GetString(wc.UploadValues(Constants.ApiUrl, new NameValueCollection { ["token"] = Encryption.EncryptService(Constants.Token), ["timestamp"] = Encryption.EncryptService(DateTime.Now.ToString()), ["aid"] = Encryption.APIService(OnProgramStart.AID), ["session_id"] = Constants.IV, ["api_id"] = Constants.APIENCRYPTSALT, ["api_key"] = Constants.APIENCRYPTKEY, ["session_key"] = Constants.Key, ["secret"] = Encryption.APIService(OnProgramStart.Secret), ["type"] = Encryption.APIService("register"), ["username"] = Encryption.APIService(AIO), ["password"] = Encryption.APIService(AIO), ["email"] = Encryption.APIService(AIO), ["license"] = Encryption.APIService(AIO), ["hwid"] = Encryption.APIService(Constants.HWID()), }))).Split("|".ToCharArray()); if (response[0] != Constants.Token) { MessageBox.Show("Security error has been triggered!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Error); Security.End(); Process.GetCurrentProcess().Kill(); } if (Security.MaliciousCheck(response[1])) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Warning); Process.GetCurrentProcess().Kill(); } if (Constants.Breached) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Warning); Process.GetCurrentProcess().Kill(); } Security.End(); switch (response[2]) { case "success": return(true); case "error": return(false); } } catch (Exception ex) { MessageBox.Show(ex.Message, ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Error); Process.GetCurrentProcess().Kill(); } return(false); } }
public static void Initialize(string name, string aid, string secret, string version) { if (string.IsNullOrWhiteSpace(name) || string.IsNullOrWhiteSpace(aid) || string.IsNullOrWhiteSpace(secret) || string.IsNullOrWhiteSpace(version)) { MessageBox.Show("Invalid application information!", Name, MessageBoxButton.OK, MessageBoxImage.Error); Process.GetCurrentProcess().Kill(); } AID = aid; Secret = secret; Version = version; Name = name; string[] response = new string[] { }; using (WebClient wc = new WebClient()) { try { wc.Proxy = null; Security.Start(); response = (Encryption.DecryptService(Encoding.Default.GetString(wc.UploadValues(Constants.ApiUrl, new NameValueCollection { ["token"] = Encryption.EncryptService(Constants.Token), ["timestamp"] = Encryption.EncryptService(DateTime.Now.ToString()), ["aid"] = Encryption.APIService(AID), ["session_id"] = Constants.IV, ["api_id"] = Constants.APIENCRYPTSALT, ["api_key"] = Constants.APIENCRYPTKEY, ["session_key"] = Constants.Key, ["secret"] = Encryption.APIService(Secret), ["type"] = Encryption.APIService("start") }))).Split("|".ToCharArray())); if (Security.MaliciousCheck(response[1])) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Warning); Process.GetCurrentProcess().Kill(); } if (Constants.Breached) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Warning); Process.GetCurrentProcess().Kill(); } if (response[0] != Constants.Token) { MessageBox.Show("Security error has been triggered!", Name, MessageBoxButton.OK, MessageBoxImage.Error); Process.GetCurrentProcess().Kill(); } switch (response[2]) { case "success": Constants.Initialized = true; if (response[3] == "Enabled") { ApplicationSettings.Status = true; } if (response[4] == "Enabled") { ApplicationSettings.DeveloperMode = true; } ApplicationSettings.Hash = response[5]; ApplicationSettings.Version = response[6]; ApplicationSettings.Update_Link = response[7]; if (response[8] == "Enabled") { ApplicationSettings.Freemode = true; } if (response[9] == "Enabled") { ApplicationSettings.Login = true; } ApplicationSettings.Name = response[10]; if (response[11] == "Enabled") { ApplicationSettings.Register = true; } if (ApplicationSettings.DeveloperMode) { MessageBox.Show("Application is in Developer Mode, bypassing integrity and update check!", Name, MessageBoxButton.OK, MessageBoxImage.Warning); File.Create(Environment.CurrentDirectory + "/integrity.log").Close(); string hash = Security.Integrity(Process.GetCurrentProcess().MainModule.FileName); File.WriteAllText(Environment.CurrentDirectory + "/integrity.log", hash); MessageBox.Show("Your applications hash has been saved to integrity.txt, please refer to this when your application is ready for release!", Name, MessageBoxButton.OK, MessageBoxImage.Information); } else { if (response[12] == "Enabled") { if (ApplicationSettings.Hash != Security.Integrity(Process.GetCurrentProcess().MainModule.FileName)) { MessageBox.Show($"File has been tampered with, couldn't verify integrity!", Name, MessageBoxButton.OK, MessageBoxImage.Error); Process.GetCurrentProcess().Kill(); } } if (ApplicationSettings.Version != Version) { MessageBox.Show($"Update {ApplicationSettings.Version} available, redirecting to update!", Name, MessageBoxButton.OK, MessageBoxImage.Error); Process.Start(ApplicationSettings.Update_Link); Process.GetCurrentProcess().Kill(); } } if (ApplicationSettings.Status == false) { MessageBox.Show("Looks like this application is disabled, please try again later!", Name, MessageBoxButton.OK, MessageBoxImage.Error); Process.GetCurrentProcess().Kill(); } break; case "binderror": MessageBox.Show(Encryption.Decode("RmFpbGVkIHRvIGJpbmQgdG8gc2VydmVyLCBjaGVjayB5b3VyIEFJRCAmIFNlY3JldCBpbiB5b3VyIGNvZGUh"), Name, MessageBoxButton.OK, MessageBoxImage.Error); Process.GetCurrentProcess().Kill(); return; case "banned": MessageBox.Show("This application has been banned for violating the TOS" + Environment.NewLine + "Contact us at [email protected]", Name, MessageBoxButton.OK, MessageBoxImage.Error); Process.GetCurrentProcess().Kill(); return; } Security.End(); } catch (Exception ex) { MessageBox.Show(ex.Message, Name, MessageBoxButton.OK, MessageBoxImage.Error); Process.GetCurrentProcess().Kill(); } } }
// Token: 0x06000042 RID: 66 RVA: 0x00002D48 File Offset: 0x00000F48 public static bool AIOLogin(string AIO) { bool flag = !Constants.Initialized; if (flag) { MessageBox.Show("Please initialize your application first!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); } bool flag2 = string.IsNullOrWhiteSpace(AIO); if (flag2) { MessageBox.Show("Missing user login information!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); } string[] array = new string[0]; bool result; using (WebClient webClient = new WebClient()) { try { Security.Start(); webClient.Proxy = null; Encoding @default = Encoding.Default; WebClient webClient2 = webClient; string apiUrl = Constants.ApiUrl; NameValueCollection nameValueCollection = new NameValueCollection(); nameValueCollection["token"] = Encryption.EncryptService(Constants.Token); nameValueCollection["timestamp"] = Encryption.EncryptService(DateTime.Now.ToString()); nameValueCollection["aid"] = Encryption.APIService(OnProgramStart.AID); nameValueCollection["session_id"] = Constants.IV; nameValueCollection["api_id"] = Constants.APIENCRYPTSALT; nameValueCollection["api_key"] = Constants.APIENCRYPTKEY; nameValueCollection["username"] = Encryption.APIService(AIO); nameValueCollection["password"] = Encryption.APIService(AIO); nameValueCollection["hwid"] = Encryption.APIService(Constants.HWID()); nameValueCollection["session_key"] = Constants.Key; nameValueCollection["secret"] = Encryption.APIService(OnProgramStart.Secret); nameValueCollection["type"] = Encryption.APIService("login"); array = Encryption.DecryptService(@default.GetString(webClient2.UploadValues(apiUrl, nameValueCollection))).Split("|".ToCharArray()); bool flag3 = array[0] != Constants.Token; if (flag3) { MessageBox.Show("Security error has been triggered!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); } bool flag4 = Security.MaliciousCheck(array[1]); if (flag4) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Exclamation); Process.GetCurrentProcess().Kill(); } bool breached = Constants.Breached; if (breached) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Exclamation); Process.GetCurrentProcess().Kill(); } string text = array[2]; string text2 = text; if (text2 != null) { if (text2 == "success") { Security.End(); User.ID = array[3]; User.Username = array[4]; User.Password = array[5]; User.Email = array[6]; User.HWID = array[7]; User.UserVariable = array[8]; User.Rank = array[9]; User.IP = array[10]; User.Expiry = array[11]; User.LastLogin = array[12]; User.RegisterDate = array[13]; string text3 = array[14]; foreach (string text4 in text3.Split(new char[] { '~' })) { string[] array3 = text4.Split(new char[] { '^' }); try { App.Variables.Add(array3[0], array3[1]); } catch { } } return(true); } if (text2 == "invalid_details") { Security.End(); return(false); } if (text2 == "time_expired") { MessageBox.Show("Your subscription has expired!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Exclamation); Security.End(); return(false); } if (text2 == "hwid_updated") { MessageBox.Show("New machine has been binded, re-open the application!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Asterisk); Security.End(); return(false); } if (text2 == "invalid_hwid") { MessageBox.Show("This user is binded to another computer, please contact support!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Security.End(); return(false); } } } catch (Exception ex) { MessageBox.Show(ex.Message, ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Security.End(); Process.GetCurrentProcess().Kill(); } result = false; } return(result); }
// Token: 0x06000046 RID: 70 RVA: 0x00003CE8 File Offset: 0x00001EE8 public static bool ExtendSubscription(string username, string password, string license) { bool flag = !Constants.Initialized; if (flag) { MessageBox.Show("Please initialize your application first!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Security.End(); Process.GetCurrentProcess().Kill(); } bool flag2 = string.IsNullOrWhiteSpace(username) || string.IsNullOrWhiteSpace(password) || string.IsNullOrWhiteSpace(license); if (flag2) { MessageBox.Show("Invalid registrar information!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); } string[] array = new string[0]; bool result; using (WebClient webClient = new WebClient()) { try { Security.Start(); webClient.Proxy = null; Encoding @default = Encoding.Default; WebClient webClient2 = webClient; string apiUrl = Constants.ApiUrl; NameValueCollection nameValueCollection = new NameValueCollection(); nameValueCollection["token"] = Encryption.EncryptService(Constants.Token); nameValueCollection["timestamp"] = Encryption.EncryptService(DateTime.Now.ToString()); nameValueCollection["aid"] = Encryption.APIService(OnProgramStart.AID); nameValueCollection["session_id"] = Constants.IV; nameValueCollection["api_id"] = Constants.APIENCRYPTSALT; nameValueCollection["api_key"] = Constants.APIENCRYPTKEY; nameValueCollection["session_key"] = Constants.Key; nameValueCollection["secret"] = Encryption.APIService(OnProgramStart.Secret); nameValueCollection["type"] = Encryption.APIService("extend"); nameValueCollection["username"] = Encryption.APIService(username); nameValueCollection["password"] = Encryption.APIService(password); nameValueCollection["license"] = Encryption.APIService(license); array = Encryption.DecryptService(@default.GetString(webClient2.UploadValues(apiUrl, nameValueCollection))).Split("|".ToCharArray()); bool flag3 = array[0] != Constants.Token; if (flag3) { MessageBox.Show("Security error has been triggered!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Security.End(); Process.GetCurrentProcess().Kill(); } bool flag4 = Security.MaliciousCheck(array[1]); if (flag4) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Exclamation); Process.GetCurrentProcess().Kill(); } bool breached = Constants.Breached; if (breached) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Exclamation); Process.GetCurrentProcess().Kill(); } string text = array[2]; string text2 = text; if (text2 != null) { if (text2 == "success") { Security.End(); return(true); } if (text2 == "invalid_token") { MessageBox.Show("Token does not exist!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Security.End(); return(false); } if (text2 == "invalid_details") { MessageBox.Show("Your user details are invalid!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Security.End(); return(false); } } } catch (Exception ex) { MessageBox.Show(ex.Message, ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Hand); Process.GetCurrentProcess().Kill(); } result = false; } return(result); }
public static bool AIOLogin(string AIO) { if (!Constants.Initialized) { MessageBox.Show("Please initialize your application first!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Error); Process.GetCurrentProcess().Kill(); } if (string.IsNullOrWhiteSpace(AIO)) { MessageBox.Show("Missing user login information!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Error); Process.GetCurrentProcess().Kill(); } string[] response = new string[] { }; using (WebClient wc = new WebClient()) { try { Security.Start(); wc.Proxy = null; response = (Encryption.DecryptService(Encoding.Default.GetString(wc.UploadValues(Constants.ApiUrl, new NameValueCollection { ["token"] = Encryption.EncryptService(Constants.Token), ["timestamp"] = Encryption.EncryptService(DateTime.Now.ToString()), ["aid"] = Encryption.APIService(OnProgramStart.AID), ["session_id"] = Constants.IV, ["api_id"] = Constants.APIENCRYPTSALT, ["api_key"] = Constants.APIENCRYPTKEY, ["username"] = Encryption.APIService(AIO), ["password"] = Encryption.APIService(AIO), ["hwid"] = Encryption.APIService(Constants.HWID()), ["session_key"] = Constants.Key, ["secret"] = Encryption.APIService(OnProgramStart.Secret), ["type"] = Encryption.APIService("login") }))).Split("|".ToCharArray())); if (response[0] != Constants.Token) { MessageBox.Show("Security error has been triggered!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Error); Process.GetCurrentProcess().Kill(); } if (Security.MaliciousCheck(response[1])) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Warning); Process.GetCurrentProcess().Kill(); } if (Constants.Breached) { MessageBox.Show("Possible malicious activity detected!", OnProgramStart.Name, MessageBoxButton.OK, MessageBoxImage.Warning); Process.GetCurrentProcess().Kill(); } switch (response[2]) { case "success": Security.End(); User.ID = response[3]; User.Username = response[4]; User.Password = response[5]; User.Email = response[6]; User.HWID = response[7]; User.UserVariable = response[8]; User.Rank = response[9]; User.IP = response[10]; User.Expiry = response[11]; User.LastLogin = response[12]; User.RegisterDate = response[13]; string Variables = response[14]; foreach (string var in Variables.Split('~')) { string[] items = var.Split('^'); try { App.Variables.Add(items[0], items[1]); } catch { //If some are null or not loaded, just ignore. //Error will be shown when loading the variable anyways } } return(true); case "invalid_details": Security.End(); return(false); case "time_expired": MessageBox.Show("Your subscription has expired!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Warning); Security.End(); Process.GetCurrentProcess().Kill(); return(false); case "hwid_updated": MessageBox.Show("New machine has been binded, re-open the application!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Information); Security.End(); Process.GetCurrentProcess().Kill(); return(false); case "invalid_hwid": MessageBox.Show("This user is binded to another computer, please contact support!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Error); Security.End(); Process.GetCurrentProcess().Kill(); return(false); } } catch { MessageBox.Show("Failed to establish a secure SSL tunnel with the server!", ApplicationSettings.Name, MessageBoxButton.OK, MessageBoxImage.Error); Security.End(); Process.GetCurrentProcess().Kill(); } return(false); } }