U
U
up72019-01-21 10:43:15
C++ / C#
up7, 2019-01-21 10:43:15

How to log in to the site using xNet?

The code

using (var request = new HttpRequest())
            {
                request.AddHeader(HttpHeader.Accept, "text/html,application/xhtml+xm…plication/xml;q=0.9,*/*;q=0.8");
                request.KeepAlive = true;
                request.AddHeader(HttpHeader.Referer, "https://fanty.online/start");
                request.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0";
                //Content-LengthCookie	sec_session_id = u9rut5e69djjunt…D % 7D; _ym_hostIndex = 0 - 2 % 2C1 - 0

                var reqParams = new RequestParams();
                reqParams["password"] = "244256";

                request.Cookies = new CookieDictionary()
    {
        {"sec_session_id", "u9rut5e69djjunt9un82i35cj5"}
    };

                string content = request.Post("https://fanty.online/start", reqParams).ToString();
                textBox1.Text = content;
            }

Everything seems to be simple, but it does not work. It doesn't even throw an error, but it doesn't log in either.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question