Created
April 12, 2012 10:54
-
-
Save dameninngenn/2366495 to your computer and use it in GitHub Desktop.
login
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/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use HTTP::Cookies; | |
use HTTP::Request::Common qw(POST); | |
use LWP::UserAgent; | |
use FindBin qw($Bin); | |
use Readonly; | |
Readonly my $COOKIE_FILE => sprintf('%s/.ff-brigade-cookie',$Bin); | |
Readonly my $FAKE_UA => 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5'; | |
my $cookie_jar = HTTP::Cookies->new(file => $COOKIE_FILE, autosave => 1); | |
my $ua = LWP::UserAgent->new( | |
agent => $FAKE_UA, | |
cookie_jar => $cookie_jar, | |
); | |
my %param = ( | |
"_CODE"=>"あ", | |
"_from"=>"lg", | |
"login_cb"=>"/_ffjm_team_action_log?team_period_id=19", | |
"new"=>"", | |
"login"=>"ログイン", | |
"login_id"=>'', | |
"login_pw"=>"" | |
); | |
my $req = POST('https://ssl.sp.mbga.jp/_lg', [%param]); | |
my $res = $ua->request( $req ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment