Autologin to Gmail / Yahoo mail with single HTML

I need a html that redirect to yahoo/gmail with auto login

i dont want to use "remember pass" / roboform / greasemonkey / etc..
just a single HTML or even a web shortcut like
http://mail.yahoo.com/login.aspx?<user>:<pass> (if that possible)

found a code from google, seems to work with greasemonkey
javascript:(function(){
var k={
'mail.yahoo.com': [0,{login:'myname',passwd:'mypass'}],
'gmail.google.com':[0,{Email:'myname',passwd:'mypass'}]
}[location.host],
f=document.forms[k[0]],e=f.elements,i=e.length,v;
while(i--)if(v=k[1][e[i]])e[i].value=v;
f.submit();
})();

Open in new window

tsphAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GawaiCommented:
http://mail.yahoo.com/login.aspx?<user>:<pass> will not be adviceable as any one can see the password in the url

anyway here we go...

1- login text field
2- passowrd field
3- combo box

function openMailWindow(form)
{
if (document.form.login.value=="")
{
alert("Enter Your UserName");
return false;
}
if (document.form.passwd.value=="")
{
alert("Enter Your PassWord");
document.form.passwd.focus();
return false;
 
}
 
 
	var LOGIN   = document.form.login.value;
	var PASSWD  = document.form.passwd.value;
	var SITE    = document.form.site.options[document.form.site.selectedIndex].value;
 
	document.form.login.value = "";
	document.form.passwd.value = "";
 
	var strURL = "";
 
	if( SITE == "yahoo" )
		strURL = "http://login.yahoo.com/config/login?.tries=&.src=ym&.last=&promo=&.intl=&.bypass=&.partner=&.chkP=Y&.done=&login=" + LOGIN + "&passwd=" + PASSWD + "&.persistent=Y";
	else if( SITE == "usanet" )
		strURL = "http://www.netaddress.com/tpl/Door/LoginPost?LoginState=2&Use_Cookie=1&DomainID=4&UserID=" + LOGIN + "&passwd=" + PASSWD + "&NA31port=80&NA31site=classic.netaddress.com&JavaScript=JScript1.0&NewServerName=www.netaddress.com&SuccessfullLogin=/tpl";
	else if( SITE == "altavista" )
		strURL = "http://mail.altavista.com/login?login=Log+in&want_lang=english&uid=&contentonly=&to=&subject&userlogin=" + LOGIN + "&password=" + PASSWD + "";
	else if( SITE == "mailcity" )
		strURL = "http://be16-mail.mailcity.lycos.com/login.notfemail?partner_key=mailcity&user_name=" + LOGIN + "&user_passwd=" + PASSWD + "&Submit=Login&version=1";
	else if( SITE == "123india" )
		strURL = "http://login.123india.com/cgi-bin/query/letmein.cgi?srv=mail&uname=" + LOGIN + "&pwd=" + PASSWD + "&login=Enter";
	else if( SITE == "rediff" )
		strURL = "http://www.rediffmail.com/cgi-bin/login.cgi?FormName=existing&login=" + LOGIN + "&passwd=" + PASSWD + "&button=Sign%in";
	else if( SITE == "aol" )
		strURL = "https://aolmail.aol.com/main.dci?langid=0&login=1&nmlogin=1&username=" + LOGIN + "&password=" + PASSWD + "";
	else if( SITE == "angelfire" )
		strURL = "http://be3-mail.angelfire.com/login.notfemail?partner_key=angel&user=" + LOGIN + "&passwd=" + PASSWD + "&version=1";
	else if( SITE == "zdnet" )
		strURL = "http://cgi.zdnet.com:80/members/regauth/register.cgi?PI=1030&BACK=http://www.zdnetonebox.com/inbox.html&RI=&USERNAME=" + LOGIN + "&PASSWORD=" + PASSWD + "";
	else if( SITE == "hotmail" )
		strURL = "http://lc4.law5.hotmail.passport.com/cgi-bin/dologin?login=" + LOGIN + "&passwd=" + PASSWD + "";
	else if( SITE == "coolmail" )
		strURL = "http://www.coolmail.com";
	else if( SITE == "cnn" )
		strURL = "http://wwww.cnn.com";
 
	window.open(strURL, "", "");
}

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GawaiCommented:
and here is the form


Check Your Emails                                                               <form name=form>
                                        <font face="Arial, Helvetica, sans-serif" size="2"><b>User 
                                        Name<br>
                                        <input name=login size="14">
                                        <br>
                                        Password<br>
                                        <input name=passwd type=password size="14">
                                        <br>
                                        Email Account</b></font><br>
                                        <select name=site>
                                          <option selected 
              value=yahoo>Yahoo 
                                          <option value=usanet>USA.NET 
                                          <option 
              value=hotmail>Hotmail 
                                          <option value=mailcity>Mailcity 
                                          <option 
              value=angelfire>Angelfire 
                                          <option value=aol>AOL 
                                          <option 
              value=123india>123 India 
                                          <option value=rediff>Rediffmail 
                                          <option 
              value=altavista>Altavista 
                                          <option value=zdnet>ZDNET mail 
                                          <option 
              value=cnn>CNN mail 
                                          <option 
            value=coolmail>Coolmail</option>
                                        </select>
                                        <br>
                                        <br>
                                        <input align=absBottom onClick=javascript:openMailWindow() type=image src="imgs/search.gif" name="button" border="0" alt="Submit" width="62" height="33">
                                      </form>
                                      

Open in new window

tsphAuthor Commented:
thanks qawai, actually i was looking for this kind of URL
http://login.yahoo.com/config/login?.tries=&.src=ym&.last=&promo=&.intl=&.bypass=&.partner=&.chkP=Y&.done=&login=" + LOGIN + "&passwd=" + PASSWD + "&.persistent=Y

and what's the URL for Gmail ?
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

tsphAuthor Commented:
one more, can you show me how you found that kind of URL ?

for example i want to see the "login URL" for V-bulletin based forum
GawaiCommented:
lets take this forum
http://www.vbulletin.org/forum/index.php

the login address may be something like...

http://www.vbulletin.org/forum/login.php?do=login&vb_login_username=" + LOGIN + "&vb_login_password=" + PASSWD + "&vb_login_md5password=" + somevalue + "&vb_login_md5password_utf=" +otheValue

i believe u know how to view the source code of that page...they have use a function md5hash(); to encrypt

GawaiCommented:
for gmail, it could be...i did not test it....u pls try it


https://www.google.com/accounts/ServiceLoginAuth?service=mail&rm=false<mpl=default<mpl=default&Email="+ LOGIN + "&Passwd=" + PASSWD + "&rmShown=1&signIn=Sign+in
tsphAuthor Commented:
the gmail URL works but doesnt correcly redirect to gmail
i'll look into that later, and for vbulletin, it has security token that generated randomly, so I must load entire page first

thanks for the solution

tsph
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.