Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public bool login2auth(string authkod)
- {
- bool flag = Operators.CompareString(this.authCode, "", false) == 0;
- if (flag)
- {
- bool flag2 = Operators.CompareString(authkod, "", false) == 0;
- if (flag2)
- {
- this.authCode = Interaction.InputBox("Please enter your secret key", "NETGuard Desktop Application", "", -1, -1);
- }
- else
- {
- this.authCode = authkod;
- }
- }
- WebClient webClient = new WebClient();
- webClient.Headers.Add("user-agent", "NETGuard.IO");
- webClient.Proxy = null;
- string data = webClient.DownloadString("https://netguard.io/API/login2auth.php?username=" + this.Username + "&start=netguard");
- string text = NetGuardApi.xor_this(data, this.authCode);
- this.tmpIV = text.Split(new char[]
- {
- '{'
- })[0];
- this.tmpsalt = text.Replace(this.tmpIV + "{0}", string.Empty);
- string username = this.Username;
- string decryptedtext = this.encode(this.encode(this.Password));
- string stringToEscape = NetGuardApi.AESEncrypt(decryptedtext, this.tmpsalt, this.tmpIV);
- webClient.Headers.Add("user-agent", "NETGuard.IO");
- webClient.Proxy = null;
- string encryptedtext = webClient.DownloadString("https://netguard.io/API/login2auth.php?username=" + username + "&password=" + Uri.EscapeDataString(stringToEscape));
- string text2 = NetGuardApi.AESDecrypt(encryptedtext, this.tmpsalt, this.tmpIV);
- bool flag3 = text2.Contains("Welcome");
- bool result;
- if (flag3)
- {
- string[] array = text2.Split(new char[]
- {
- '|'
- });
- this.CurrentPoint = array[2];
- bool flag4 = array.Count<string>() > 3;
- if (flag4)
- {
- this.isBeta = true;
- }
- else
- {
- this.isBeta = false;
- }
- result = true;
- }
- else
- {
- Interaction.MsgBox("Wrong password!", MsgBoxStyle.OkOnly, null);
- result = false;
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement