Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/perl
- use warnings;
- use strict;
- use LWP::UserAgent;
- use Digest::SHA "sha1", "sha1_hex";
- # use HTTP::Cookies;
- my $ua = LWP::UserAgent->new;
- my $salt;
- my $sessid;
- # $ua->timeout(10);
- # $ua->env_proxy;
- $ua->cookie_jar( {} );
- my $response = $ua->get('http://forum.killpls.me/index.php?action=login');
- die $response->status_line if (!$response->is_success);
- my $content = $response->decoded_content;
- if ($content =~ /PHPSESSID=([^&]*)&action=login2/) {
- $sessid = $1;
- } else { die "no sessid found"; }
- if ($content =~ /hashLoginPassword\(this, '([^\)]*)'\)/) {
- $salt = $1;
- } else { die "no salt found"; }
- # print "salt = ${salt}\nsession = ${sessid}\n";
- my $hashpass = sha1_hex('<yourhashedpassword>' . $salt);
- $response = $ua->post ("http://forum.killpls.me/index.php?PHPSESSID=$sessid"
- . "&action=login2",
- Content => [user => '<yournickname>',
- passwrd => '',
- hash_passwrd => $hashpass]);
- $response = $ua->get('http://forum.killpls.me/index.php');
- print $response->decoded_content;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement