Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Autologin to Gmail / Yahoo mail with single HTML

Posted on 2008-11-17
7
Medium Priority
?
3,840 Views
Last Modified: 2012-05-05
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

0
Comment
Question by:tsph
  • 4
  • 3
7 Comments
 
LVL 20

Accepted Solution

by:
Gawai earned 1500 total points
ID: 22982690
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

0
 
LVL 20

Expert Comment

by:Gawai
ID: 22982714
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

0
 

Author Comment

by:tsph
ID: 22982889
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 ?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:tsph
ID: 22983024
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
0
 
LVL 20

Expert Comment

by:Gawai
ID: 22983231
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

0
 
LVL 20

Expert Comment

by:Gawai
ID: 22983305
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
0
 

Author Closing Comment

by:tsph
ID: 31517689
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
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question