Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.07 KB | None | 0 0
  1. #! /usr/bin/perl
  2.  
  3. use warnings;
  4. use strict;
  5.  
  6. use LWP::UserAgent;
  7. use Digest::SHA "sha1", "sha1_hex";
  8. # use HTTP::Cookies;
  9.  
  10. my $ua = LWP::UserAgent->new;
  11. my $salt;
  12. my $sessid;
  13. # $ua->timeout(10);
  14. # $ua->env_proxy;
  15.  
  16. $ua->cookie_jar( {} );
  17.  
  18. my $response = $ua->get('http://forum.killpls.me/index.php?action=login');
  19. die $response->status_line if (!$response->is_success);
  20.  
  21. my $content = $response->decoded_content;
  22.  
  23. if ($content =~ /PHPSESSID=([^&]*)&action=login2/) {
  24.     $sessid = $1;
  25. } else { die "no sessid found"; }
  26.  
  27. if ($content =~ /hashLoginPassword\(this, '([^\)]*)'\)/) {
  28.     $salt = $1;
  29. } else { die "no salt found"; }
  30.  
  31. # print "salt = ${salt}\nsession = ${sessid}\n";
  32.  
  33. my $hashpass = sha1_hex('<yourhashedpassword>' . $salt);
  34.  
  35. $response = $ua->post ("http://forum.killpls.me/index.php?PHPSESSID=$sessid"
  36.                . "&amp;action=login2",
  37.                Content => [user => '<yournickname>',
  38.                    passwrd => '',
  39.                    hash_passwrd => $hashpass]);
  40.  
  41.  
  42. $response = $ua->get('http://forum.killpls.me/index.php');
  43.  
  44. print $response->decoded_content;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement