SSID: CBS-WLAN
user: yapc2008@cbs.dk
pw: Daqy-852

--
Small script to authenticate from command line:

#!/usr/bin/env perl
use strict;
use warnings;
use WWW::Mechanize;

my $URI = 'http://www.google.com/';

my $mech = WWW::Mechanize->new(agent => 'YAPC::EU/2008', autocheck => 1,

quiet => 1);


my $response = $mech->get($URI);

if ($mech->form_name('bluesocket_u')) {

print {*STDERR} "logging in... ";
$mech->field(bs_name => 'yapc2008@cbs.dk');
$mech->field(bs_password => 'Daqy-852');
$mech->submit();

}

die 'not what you expect!'

if $mech->form_name('bluesocket_u');

print {*STDERR} "OK!\n";


version 2 saved on 13/08/08 14:22 by Flavio Poletti (‎polettix‎)

Home | Tags | Recent changes | History