Skip to content

Instantly share code, notes, and snippets.

@b10m
Created January 31, 2013 16:03
Show Gist options
  • Save b10m/4683930 to your computer and use it in GitHub Desktop.
Save b10m/4683930 to your computer and use it in GitHub Desktop.
HoGent allowed 20 accounts internet access at a time. I'm to lazy to snipe a free position and use this }:-)
use strict;
use LWP::UserAgent;
my $url = 'https://webauthentication.hogent.be/login.html';
my @passwords = qw( insert passwords here o_O );
my $ua = LWP::UserAgent->new();
for( my $i = 0; $i < @passwords; $i++) {
my $user = sprintf("hgguest%02d", $i+1);
my $res = $ua->post("$url?redirect=tnx.nl/ip",{
'buttonClicked' => 4,
'err_flag' => 0,
'info_flag' => 0,
'redirect_url' => 'http%3A%2F%2Ftnx.nl%2Fip',
'username' => $user,
'password' => $passwords[$i],
});
if( $res->content !~ m!<FORM method="post" ACTION="/login.html">!s ) {
print "Looks like you got lucky with $user\nEnjoy!\n";
exit;
} else {
print "$user: no luck ...\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment