Re: how to login into a website automatically in a java application without typing the username and password manually



Lew wrote :
Wojtek wrote:
zhouqiang94@xxxxxxxxx wrote :
There is a website whose first page is for user to login. When user
visit the page and fill in the username and password , he can login
into the website. The website has developed. Now the work need to do
is: develop a java application in which the username and password is
known to login into the weibsite automatically without typing the
username and password manually. How to implement that?

Use a coockie. The user still has to log in the first time, but then set a cookie.

When they visit again, check for the cookie (and its validity), and log them in.

Note though that this is highly in-secure and not recommended practice.

How about a certificate? Is there a way to leverage a PKI such as GPG?

If I have access to your computer, I can steal anything on it. So I can copy any certificate, file, cookie, etc.

I can copy that file to my computer, and now I am you.

You really should be asking the user for something (userid, password, etc) prior to authenticating them.

Unless it is a low security site and it does not matter if someone becomes someone else.

Remember: you are who you log in as.

--
Wojtek :-)


.



Relevant Pages

  • Re: Accessing and displaying SSL web pages and cookies from a windows form
    ... or LoadXML calls to urls on the website in order to get data or post data to ... first redirected to a SSL login page, if a particular cookie is not present, ... cookie is not present instead of getting the data. ... >> the data in the cookie and also not redirect to the login page. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Accessing and displaying SSL web pages and cookies from a windows form
    ... > I have a website that uses an ISAPI filter that will redirect anyone going ... > cookie and redirected back to the page they initially tried to go to. ... > website and utilizes that SSL login form and the session cookie generated ... > the data in the cookie and also not redirect to the login page. ...
    (microsoft.public.dotnet.languages.vb)
  • create cookie with keys using GetAuthCookie
    ... The above creates a HttpCookie with the encrypted ticket information ... along with the username. ... Also note that I have set the cookie to expire after 2 months. ... hello message with his username (i.e. the user isn't forced to login ...
    (microsoft.public.dotnet.framework.aspnet)
  • Accessing and displaying SSL web pages and cookies from a windows form
    ... I have a website that uses an ISAPI filter that will redirect anyone going ... cookie and redirected back to the page they initially tried to go to. ... website and utilizes that SSL login form and the session cookie generated by ...
    (microsoft.public.dotnet.languages.vb)
  • Re: MOSS form based authentication
    ... Does the website with form based authentication provide session time out ... able to find the login page by opening up the web.config file for this ... The cookie settings would be defined in this ...
    (microsoft.public.sharepoint.portalserver)