我已经开始使用xNet,并且设法从控制台应用程序登录时没有cookie。
但是,现在我想从控制台应用程序登录到Roblox,但是问题是我必须获取cookie才能使其正常工作。
using (var request = new HttpRequest())
{
request.Cookies = new CookieDictionary();
//request.Proxy = HttpProxyClient.Parse("127.0.0.1:9999");
request.IgnoreProtocolErrors = true;
request.KeepAlive = true;
request.ConnectTimeout = 10000;
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134";
request.AddHeader("Origin", "https://zenmate.com");
request.Referer = "https://zenmate.com/";
request.AddParam("Email", "example@gmail.com");
request.AddParam("password", 123456);
request.AddParam("cvalue", "ctype");
var attempt = request.Post("https://auth.roblox.com/v1/login").ToString();
}
主要问题是:
我如何将cookie获取到cookiedictionary,以便该网站认为我是个人,并允许我登录