Ejemplo n.º 1
0
        public static void ParseHttpResponse(string httpResponse, string currentCode)
        {
            if (httpResponse.Contains("Unknown Gift Code"))
            {
                CPM_aux++; check++; bad++;
                Colorful.Console.WriteLine("[BAD] " + currentCode, Color.DarkRed);
            }
            else if (httpResponse.Contains(", \"name\": \"Nitro\", \"summary\":"))
            {
                CPM_aux++; check++; hits++;
                Colorful.Console.WriteLine("[GOOD] " + currentCode, Color.DarkGreen);
                CheckerHelper.SaveData(currentCode);
            }

            /*else if (httpResponse.Contains("You are being rate limited") ||
             *      httpResponse.Contains("You have tried to access a web page which is in violation of your internet usage policy"))
             * {
             *      CheckerHelper.accounts.Add(currentCode);
             * }*/
            else
            {
                CheckerHelper.accounts.Add(currentCode);
            }
        }
 // Token: 0x06000004 RID: 4 RVA: 0x0000222C File Offset: 0x0000042C
 public static void Check()
 {
     for (;;)
     {
         bool flag = CheckerHelper.proxyindex > CheckerHelper.proxies.Count <string>() - 2;
         if (flag)
         {
             CheckerHelper.proxyindex = 0;
         }
         try
         {
             Interlocked.Increment(ref CheckerHelper.proxyindex);
             using (HttpRequest httpRequest = new HttpRequest())
             {
                 bool flag2 = CheckerHelper.accindex >= CheckerHelper.accounts.Count <string>();
                 if (flag2)
                 {
                     CheckerHelper.stop++;
                     break;
                 }
                 Interlocked.Increment(ref CheckerHelper.accindex);
                 string text = CheckerHelper.accounts[CheckerHelper.accindex];
                 try
                 {
                     bool flag3 = CheckerHelper.proxytype == "HTTP";
                     if (flag3)
                     {
                         httpRequest.Proxy = HttpProxyClient.Parse(CheckerHelper.proxies[CheckerHelper.proxyindex]);
                         httpRequest.Proxy.ConnectTimeout = 5000;
                     }
                     bool flag4 = CheckerHelper.proxytype == "SOCKS4";
                     if (flag4)
                     {
                         httpRequest.Proxy = Socks4ProxyClient.Parse(CheckerHelper.proxies[CheckerHelper.proxyindex]);
                         httpRequest.Proxy.ConnectTimeout = 5000;
                     }
                     bool flag5 = CheckerHelper.proxytype == "SOCKS5";
                     if (flag5)
                     {
                         httpRequest.Proxy = Socks5ProxyClient.Parse(CheckerHelper.proxies[CheckerHelper.proxyindex]);
                         httpRequest.Proxy.ConnectTimeout = 5000;
                     }
                     bool flag6 = CheckerHelper.proxytype == "NO";
                     if (flag6)
                     {
                         httpRequest.Proxy = null;
                     }
                     httpRequest.UserAgent            = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36";
                     httpRequest.KeepAlive            = true;
                     httpRequest.IgnoreProtocolErrors = true;
                     httpRequest.ConnectTimeout       = 5000;
                     httpRequest.UseCookies           = true;
                     httpRequest.AddHeader("Authorization", "mfa.TrYd-1Giyv9PUgpiv09tE9zoUfmYZIHjbvRx9K4bxl3TsaQ4h3Mjrj6NV0ro9ImI2q1fdXr104EC79H-NS0r");
                     httpRequest.AddHeader("X-Fingerprint", "622832459796709396.no-ggtFhW5yweBngUZhaXThqlKk");
                     string text2 = httpRequest.Get("https://discordapp.com/api/v6/entitlements/gift-codes/" + text + "?with_application=true&with_subscription_plan=true", null).ToString();
                     bool   flag7 = text2.Contains("Unknown Gift Code");
                     if (flag7)
                     {
                         CheckerHelper.CPM_aux++;
                         CheckerHelper.check++;
                         CheckerHelper.bad++;
                         Colorful.Console.WriteLine("[BAD] " + text, Color.DarkRed);
                     }
                     else
                     {
                         bool flag8 = text2.Contains("You are being rate limited");
                         if (flag8)
                         {
                             CheckerHelper.accounts.Add(text);
                         }
                         else
                         {
                             bool flag9 = text2.Contains("You have tried to access a web page which is in violation of your internet usage policy");
                             if (flag9)
                             {
                                 CheckerHelper.accounts.Add(text);
                             }
                             else
                             {
                                 bool flag10 = text2.Contains(", \"name\": \"Nitro\", \"summary\":");
                                 if (flag10)
                                 {
                                     CheckerHelper.CPM_aux++;
                                     CheckerHelper.check++;
                                     CheckerHelper.hits++;
                                     Colorful.Console.WriteLine("[GOOD] " + text, Color.DarkGreen);
                                     CheckerHelper.SaveData(text);
                                 }
                                 else
                                 {
                                     CheckerHelper.accounts.Add(text);
                                 }
                             }
                         }
                     }
                 }
                 catch (Exception)
                 {
                     CheckerHelper.accounts.Add(text);
                 }
             }
         }
         catch
         {
             Interlocked.Increment(ref CheckerHelper.err);
         }
     }
 }