Created
September 17, 2010 08:02
-
-
Save keiya/583900 to your computer and use it in GitHub Desktop.
Univ. of Tsukuba WLAN Auth Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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