Skip to content

Instantly share code, notes, and snippets.

@keiya
Created September 17, 2010 08:02
Show Gist options
  • Save keiya/583900 to your computer and use it in GitHub Desktop.
Save keiya/583900 to your computer and use it in GitHub Desktop.
Univ. of Tsukuba WLAN Auth Script
#!/usr/bin/perl
use strict;
use LWP::UserAgent;
use HTTP::Request::Common qw(POST);
# リクエストの生成
my $url = 'https://wlan-auth1.cc.tsukuba.ac.jp/login.html';
my %formdata = ('buttonClicked' => '4','username' => 'YOUR_ID', 'password' => 'YOUR_PASSWORD');
my $request = POST($url, [%formdata]);
# UserAgentを生成して処理
my $ua = LWP::UserAgent->new;
my $res = $ua->request($request);
print $res->as_string;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment