Advertisement
Guest User

Untitled

a guest
May 10th, 2018
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.18 KB | None | 0 0
  1. http.TargetHost := 'www.instagram.com';
  2. http.UserAgent := 'Mozilla/3.0 (compatible; Indy Library)';
  3. http.Headers.Add('Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8');
  4. if http.HTTPMethod('get', 'https://www.instagram.com/oauth/authorize/?client_id=c3510d694cec48bbaabea7dcdf20986f&redirect_uri=http://stapico.ru/accounts/auth/complete&response_type=code&scope=likes+comments+relationships') then
  5. begin
  6. token := Pars('csrftoken=', http.Headers.Text, ';');
  7. http.Clear;
  8. data.WriteString('csrfmiddlewaretoken=' + token + '&username=' + login + '&password=' + pass);
  9. http.TargetHost := 'www.instagram.com';
  10. http.UserAgent := 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0';
  11. http.Headers.Add('Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8');
  12. http.MimeType := 'application/x-www-form-urlencoded';
  13. http.Headers.Add('Referer:https://www.instagram.com/accounts/login/?force_classic_login=&next=/oauth/authorize/' + '%3Fclient_id%3Dc3510d694cec48bbaabea7dcdf20986f%26redirect_uri%3Dhttp%3A//stapico.ru/accounts/auth/complete%26response_type%3Dcode%26scope%3Dlikes%2Bcomments%2Brelationships');
  14. http.Document.LoadFromStream(data);
  15. if http.HTTPMethod('post', 'https://www.instagram.com/accounts/login/?force_classic_login=&next=/oauth/authorize/%3Fclient_id%3Dc3510d694cec48bbaabea7dcdf20986f%26redirect_uri%3' + 'Dhttp%3A//stapico.ru/accounts/auth/complete%26response_type%3Dcode%26scope%3Dlikes%2Bcomments%2Brelationships') then
  16. begin
  17. if (Pos('u/accounts/auth/complete&response', http.Headers.Text) <> 0) then
  18. begin
  19. html.LoadFromStream(http.Document);
  20. http.Clear;
  21. http.Headers.Clear;
  22. http.TargetHost := 'www.instagram.com';
  23. http.UserAgent := 'Mozilla/3.0 (compatible; Indy Library)';
  24. http.Headers.Add('Accept:image/png,image/*;q=0.8,*/*;q=0.5');
  25. http.Headers.Add('Referer:https://www.instagram.com/');
  26. if http.HTTPMethod('get', 'https://www.instagram.com/' + login + '/?__a=1') then
  27. begin
  28. html.LoadFromStream(http.Document);
  29. podpis := pars('"follows": {"count":', html.Text, '}');
  30. podpisan := pars('"followed_by": {"count":', html.Text, '}');
  31. media := pars(' "media": {"count":', html.Text, ',');
  32. media := StringReplace(media, '}', '', [rfReplaceAll, rfIgnoreCase]);
  33. checkpoint := 'Нет';
  34. rezult := 1;
  35. Inc(godak);
  36. end
  37. else
  38. rezult := 0;
  39.  
  40. end
  41. else
  42. begin
  43. rezult := 2;
  44. if Pos('checkpoint_logged', http.Headers.Text) <> 0 then
  45. begin
  46.  
  47. rezult := 3;
  48. Inc(nogames);
  49. end;
  50. if http.ResultCode = 403 then
  51. rezult := 0;
  52.  
  53. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement