Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

timed challenge in perl


clone4's Avatar
Perl-6 Wisdom Seeker
0 0

So i started to write some code to finish timed challenge 1. I've already got the code to get the b64 string, decrypt it and return it. Nothing tough, but now I've been stuck on one problem for quite a while; To access the timed challenges folder, you have to be logged in, so I wrote quite simple script to just post the info on the server :

use LWP::UserAgent; use HTTP::Cookies;

$agent = LWP::UserAgent->new; $agent->agent('Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/0000000000 Mandriva/2.0.0.13-1.1mdv2008.0 (2008.0) Firefox/2.0.0.13');

my $request = HTTP::Request->new(POST => 'http://www.hellboundhackers.org/index.php'); $request->content_type('application/x-www-form-urlencoded'); $request->content('user_name=clone4&user_pass=tryme&login=Login');

$respond = $agent->request($request); print $respond->as_string;

but I always get the infamous malformed request page… I've already tried 3 different modules ( including LWP::UserAgent, HTTP::Request and HTTP::Request::Common) and altered the code many times, but nothing worked so far, any ideas why I get the error page? Do I have to Include any other information in the POST request ?

Thanks for any help…


spyware's Avatar
Banned
0 0

Post a referer.


clone4's Avatar
Perl-6 Wisdom Seeker
0 0

spyware wrote: Post a referer.

I'll try that, thanks :)


clone4's Avatar
Perl-6 Wisdom Seeker
0 0

moshbat wrote: Why don't you just set your HBH cookie?

not sure what you mean….


spyware's Avatar
Banned
0 0

clone4 wrote: not sure what you mean….

Think he means that you should check your header when you post in firefox, and copy that to perl.


ghost's Avatar
0 0

You don't need the browser, anyway you need to save the cookie.