Skip to content

Instantly share code, notes, and snippets.

@yswallow
Created May 19, 2015 07:53
Show Gist options
  • Select an option

  • Save yswallow/81b77e8ce524aa63b635 to your computer and use it in GitHub Desktop.

Select an option

Save yswallow/81b77e8ce524aa63b635 to your computer and use it in GitHub Desktop.
ITF大のLANの認証スクリプト
require 'net/http'
require 'uri'
utid13 = 'your id'
password = 'your password'
url = 'https://webauth03.cc.tsukuba.ac.jp:8443/cgi-bin/adeflogin.cgi'
res = Net::HTTP.post_form(URI.parse(url), {'name' => utid13, 'pass' => password })
puts res.body.scan(/Login.+?</) do |match|
puts match.chop
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment