#-- DESCRIPTION: #-- Note: the script has really been superceded by the scripts 'login-geocities.sh' # and 'upload-geocities.sh' # #-- A description of the process of the script is as #-- follows: #-- 1) Get the Yahoo! Geocities Login Form from http://geocities.yahoo.com #-- 2) Put the user account information into the form #-- (user-name & password) #-- 3) Reformat the 'input' fields in the form so that #-- they can be used by the curl -d switch #-- (i.e. strip html tags, url encode fields, remove #-- newline characters etc) #-- 4) Post (submit) this information to the Form's target #-- and save any cookies and headers which the server #-- sends. Also follow any redirects which the server #-- specifies. #-- 5) Get the final Yahoo! Mail home-page location by looking at #-- the final redirection instruction sent by the server #-- #-- #-- NOTES: #-- This appears to be succesfully logging in to the geocities server. # (august 2003) # #-- The script needs to overcome several devices used #-- by yahoo. #-- a) The use of cookies #-- b) The use of automatic redirects of the web-client #-- (using the LOCATION http header field) #-- c) The use of ssl to encrypt the logon process #-- d) The use of hidden fields with random numbers within #-- the Yahoo! Mail Log-in Form to discourage automatic logins #-- #-- These things can all be overcome because of the #-- capabilities of the 'curl' non-interactive web client. #-- #-- This script has only been used within the 'cygwin' #-- unix emulating bash shell running on WinMe. # #-- Revisions: #-- may 2002, I created this script, #-- august 2003, Barcelona, I am revising this script in order to adapt it #-- to uploading a file to a free geocities account. Also I would like to #-- rewrite this as a java application, (even an applet, although that is a little #-- optimistic) so that it could be used from an internet cafe or from some #-- other somewhat 'hostile' location. #-- AUTHOR: mj bishop (matth3wbishop@yahoo.com) #-- #--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--* sTargetUrl="" #-- The initial target of the login form sYahooMailHomeUrl="" #-- The final url of the Yahoo! Mail home page sYahooMailHostName="" #-- Just the host-name of the above. sInitialUrl="http://www.geocities.com" curl -L http://www.geocities.com > login-form.html #-- Extract the form fields from the html #-- sTargetUrl=$(\ expand login-form.html | \ sed -n '/