Created
August 3, 2010 17:05
-
-
Save mtelis/506736 to your computer and use it in GitHub Desktop.
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
require 'httpclient' | |
Google_Login = 'googlename' | |
Google_Password = 'password' | |
PRE_LOGIN_URL = "https://www.google.com/accounts/ServiceLogin" | |
LOGIN_URL = "https://www.google.com/accounts/ServiceLoginAuth" | |
VOICE_HOME_URL = "https://www.google.com/voice" | |
clnt = HTTPClient.new(:agent_name => "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2") | |
#clnt.debug_dev = STDERR | |
resp = clnt.get PRE_LOGIN_URL | |
clnt.cookie_manager.cookies.each {|x| @galx=x.value if x.name == 'GALX'} # fetch GALX | |
resp = clnt.post_content LOGIN_URL, | |
:service => 'grandcentral', | |
:continue => 'https://www.google.com/voice', | |
:Email => Google_Login, | |
:Passwd => Google_Password, | |
:GALX => @galx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment