Skip to content

Commit

Permalink
Fix: Not being able to login to osu
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotrekol committed Mar 23, 2020
1 parent 15d804b commit 4f79f41
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public bool Login(string loginPageAddress, string loginData)
{
var homePageRequest = (HttpWebRequest)WebRequest.Create("https://osu.ppy.sh/home");
homePageRequest.CookieContainer = CookieContainer;
homePageRequest.GetResponse();
var token = CookieContainer.ToList().First(x => x.Name == "XSRF-TOKEN");

var homeResponse = (HttpWebResponse)homePageRequest.GetResponse();
var token = homeResponse.Cookies["XSRF-TOKEN"].Value;
var request = (HttpWebRequest)WebRequest.Create(loginPageAddress);

request.Method = "POST";
Expand Down

0 comments on commit 4f79f41

Please sign in to comment.