Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
2,348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. http.MimeType:='application/x-www-form-urlencoded';
  2. http.UserAgent:='Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36';
  3. if http.HTTPMethod(GET, 'https://www.epicgames.com/login?redirected=1') then
  4. begin
  5. HTML.LoadFromStream(HTTP.Document);
  6. Parsing[0]:=Form1.Pars('client_id=', HTTP.Headers.Text, '&');
  7. http.Clear;
  8.  
  9. http.MimeType:='application/x-www-form-urlencoded';
  10. if http.HTTPMethod(GET, 'https://accounts.epicgames.com/login/doLogin?client_id='+Parsing[0]+'&redirectUrl=https%3A%2F%2Fwww.epicgames.com%2Fru') then
  11. begin
  12. HTML.LoadFromStream(HTTP.Document);
  13. Parsing[1]:=Form1.Pars('<input type="hidden" name="X-XSRF-TOKEN" value="', Html.Text, '"');
  14. http.Clear;
  15.  
  16. http.MimeType:='application/x-www-form-urlencoded';
  17. DATA.WriteString('X-XSRF-TOKEN='+Parsing[1]+'&X-XSRF-URI=%2Flogin%2FdoLogin&fromForm=yes&authType=&linkExtAuth=&client_id=+Parsing[0]+&redirectUrl=https%3A%2F%2Fwww.epicgames.com%2Fru&epic_username='+Input.Login+'&password='+Input.Password);
  18. HTTP.Document.LoadFromStream(DATA);
  19. http.Headers.Add('Referer:https://accounts.epicgames.com/login?lang=ru&redirectUrl=https%3A%2F%2Fwww.epicgames.com%2Fru&client_id='+Parsing[0]+'&noHostRedirect=true');
  20. if http.HttpMethod(POST, 'https://accounts.epicgames.com/login/doLogin') then
  21. begin
  22. if Pos('Set-Cookie: EPIC_BEARER_TOKEN=', HTTP.Headers.Text) <> 0 then
  23. begin
  24. HTTP.Document.Clear;
  25. HTTP.Headers.Clear;
  26. HTTP.HTTPMethod('GET', '');
  27. HTML.LoadFromStream(HTTP.Document);
  28. HTML.Text:=Utf8ToAnsi(HTML.Text);
  29. Parsing[2]:=Form1.Pars('', html.text ,'');
  30. Result:=Good
  31. end else Result:=Bad;
  32. end else Result:=Error;
  33. end;
  34. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement