Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use LWP::UserAgent;
- print "Username => ";
- $username=<STDIN>;
- chomp($username);
- print "Password => ";
- $password=<STDIN>;
- chomp($password);
- $sarahah = LWP::UserAgent->new();
- $response = $sarahah->post('https://www.sarahah.com/api/account/login',{ username => $username , password => $password , grant_type => 'password' });
- if ($response->content=~ /"access_token":"/) {
- print "Logged ($username:$password)\n";
- }
- else
- {
- if ($response->content=~ /The username\/password couple is invalid./) {
- print "Failed ($username:$password)\n";
- }
- else
- {
- if ($response->content=~ /The user does not exist./) {
- print "The ($username) does not found.\n";
- }
- else
- {
- print $response->content();
- }
- }
- }
- # CoDeD By 1337r00t
Add Comment
Please, Sign In to add comment