Automatic login a website

Discussion in 'Java' started by hennakapoor, Jan 19, 2005.

  1. hennakapoor

    hennakapoor Guest

    Hi
    I am trying to think of a solution for logging automatically into a
    website say mail.yahoo.com.
    The user provides the username and the password and the website address
    and the application should log automatically into it.
    I realize that there may not be a general purpose solution.
    Nevertheless, I was curious to figure out if this can be done for
    mail.yahoo.com.
    The place where I am getting stuck is this:
    mail.yahoo.com does a javascript md5 of the username and password and
    then sends it in a POST.
    How do I do that in an application i.e.
    a) the application should download the webpage (done)
    b) the application should then parse the webpage and extract
    javascript(done...partially)
    c) the application should then run javascript interpreter to execute
    the relevant md5 javascript (not done...do I have to include a
    javascript interpreter in the application then?)
    d) the application should then send a POST with the processed data(can
    be done...)

    Step (b) is pretty complex and I don't think I will be able to do it as
    a general purpose solution
    Are there any other suggestions to achieve this goal?
    I used to think that automatic login should be pretty simple given that
    automatic form filling is available everywhere. However, am facing
    problems at every step. Thanks for any suggestions
     
    hennakapoor, Jan 19, 2005
    #1
    1. Advertising

  2. hennakapoor

    Erwin Moller Guest

    hennakapoor wrote:

    > Hi
    > I am trying to think of a solution for logging automatically into a
    > website say mail.yahoo.com.
    > The user provides the username and the password and the website address
    > and the application should log automatically into it.
    > I realize that there may not be a general purpose solution.
    > Nevertheless, I was curious to figure out if this can be done for
    > mail.yahoo.com.
    > The place where I am getting stuck is this:
    > mail.yahoo.com does a javascript md5 of the username and password and
    > then sends it in a POST.
    > How do I do that in an application i.e.
    > a) the application should download the webpage (done)
    > b) the application should then parse the webpage and extract
    > javascript(done...partially)
    > c) the application should then run javascript interpreter to execute
    > the relevant md5 javascript (not done...do I have to include a
    > javascript interpreter in the application then?)
    > d) the application should then send a POST with the processed data(can
    > be done...)
    >
    > Step (b) is pretty complex and I don't think I will be able to do it as
    > a general purpose solution
    > Are there any other suggestions to achieve this goal?
    > I used to think that automatic login should be pretty simple given that
    > automatic form filling is available everywhere. However, am facing
    > problems at every step. Thanks for any suggestions


    Hi,

    Didn't you mean to send this posting to a javaSCRIPT newsgroup instead?
    Try comp.lang.javascript next time. :)

    A for your problem:
    Why don't you use the md5-js-routine to hash the usename/password and send
    it directly to mail.yahoo.com without intermediate steps?

    Regards,
    Erwin Moller
     
    Erwin Moller, Jan 19, 2005
    #2
    1. Advertising

  3. hennakapoor

    hennakapoor Guest

    > Didn't you mean to send this posting to a javaSCRIPT newsgroup
    instead?
    > Try comp.lang.javascript next time. :)
    >
    > A for your problem:
    > Why don't you use the md5-js-routine to hash the usename/password and

    send
    > it directly to mail.yahoo.com without intermediate steps?


    Yes I think I should post it to comp.lang.javascript also? The reason I
    posted in this group is because the utilities that I had come across
    that behave in somewhat similar (not *exactly*) are all written in Java
    and I initially started on the assumption that Java will have some
    classes to support this.

    The reason I cannot hardcode md5-js-routine in my code is because then
    it will not be general purpose code. mail.yahoo.com was an example of
    the kind of the problem that I am facing which is parse the webpage and
    then execute any javascript if included in the webpage

    Erwin Moller wrote:
    > hennakapoor wrote:
    >
    > > Hi
    > > I am trying to think of a solution for logging automatically into a
    > > website say mail.yahoo.com.
    > > The user provides the username and the password and the website

    address
    > > and the application should log automatically into it.
    > > I realize that there may not be a general purpose solution.
    > > Nevertheless, I was curious to figure out if this can be done for
    > > mail.yahoo.com.
    > > The place where I am getting stuck is this:
    > > mail.yahoo.com does a javascript md5 of the username and password

    and
    > > then sends it in a POST.
    > > How do I do that in an application i.e.
    > > a) the application should download the webpage (done)
    > > b) the application should then parse the webpage and extract
    > > javascript(done...partially)
    > > c) the application should then run javascript interpreter to

    execute
    > > the relevant md5 javascript (not done...do I have to include a
    > > javascript interpreter in the application then?)
    > > d) the application should then send a POST with the processed

    data(can
    > > be done...)
    > >
    > > Step (b) is pretty complex and I don't think I will be able to do

    it as
    > > a general purpose solution
    > > Are there any other suggestions to achieve this goal?
    > > I used to think that automatic login should be pretty simple given

    that
    > > automatic form filling is available everywhere. However, am facing
    > > problems at every step. Thanks for any suggestions

    >
    > Hi,
    >
    > Didn't you mean to send this posting to a javaSCRIPT newsgroup

    instead?
    > Try comp.lang.javascript next time. :)
    >
    > A for your problem:
    > Why don't you use the md5-js-routine to hash the usename/password and

    send
    > it directly to mail.yahoo.com without intermediate steps?
    >
    > Regards,
    > Erwin Moller
     
    hennakapoor, Jan 19, 2005
    #3
  4. hennakapoor

    Erwin Moller Guest

    hennakapoor wrote:

    >> Didn't you mean to send this posting to a javaSCRIPT newsgroup

    > instead?
    >> Try comp.lang.javascript next time. :)
    >>
    >> A for your problem:
    >> Why don't you use the md5-js-routine to hash the usename/password and

    > send
    >> it directly to mail.yahoo.com without intermediate steps?

    >
    > Yes I think I should post it to comp.lang.javascript also? The reason I
    > posted in this group is because the utilities that I had come across
    > that behave in somewhat similar (not *exactly*) are all written in Java
    > and I initially started on the assumption that Java will have some
    > classes to support this.
    >
    > The reason I cannot hardcode md5-js-routine in my code is because then
    > it will not be general purpose code. mail.yahoo.com was an example of
    > the kind of the problem that I am facing which is parse the webpage and
    > then execute any javascript if included in the webpage


    Hi hennakapoor,

    Are you REALLY trying to create software that can 'bypass' the original
    setup, regardless how it was implemented in JS?
    I mean, you want your code to work by examining the 'raw' JS and mimic its
    behaviour?
    Even when it was created to make thing difficult?

    That requires quite a bit of really smart advanched parsing.

    Completely beyond my grasp I must admit...
    :-/

    Or maybe you have some smart trick I don't see??

    I hope somebody else can help you.

    Good luck!

    Regards,
    Erwin Moller
     
    Erwin Moller, Jan 20, 2005
    #4
  5. hennakapoor

    hennakapoor Guest

    Thanks for your response. You are correct in your assessment that this
    will require smart advanced parsing. That is exactly where I was stuck
    and was trying to figure out alternatives. Now that you have echoed the
    same view- I guess the problem has to be resolved in an alternative
    way.

    I am now thinking of creating a small automatic form filler software.
    Plenty of these exist e.g. check roboform. The solution using this will
    be fairly cumbersome - but that is the best that can be had under the
    circumstances.

    The latest problem (I always have a problem at hand:))
    How do the form filling software determine which text field gets what
    data i.e. a typical form filling software will ask the user to enter
    the username / address / password etc. Whenever it goes to a website
    (ANY website) that requires these data - it tries to supply the
    relevant data to the most appropriate text field. How does it decide
    that?

    Am posting it to this newsgroup since again most of these software seem
    to be java based and also I could not find a more relevant place. If
    anyone can point me to a more relevant location - that will also help
    Thanks

    Erwin Moller wrote:

    > Hi hennakapoor,
    >
    > Are you REALLY trying to create software that can 'bypass' the

    original
    > setup, regardless how it was implemented in JS?
    > I mean, you want your code to work by examining the 'raw' JS and

    mimic its
    > behaviour?
    > Even when it was created to make thing difficult?
    >
    > That requires quite a bit of really smart advanched parsing.
    >
    > Completely beyond my grasp I must admit...
    > :-/
    >
    > Or maybe you have some smart trick I don't see??
    >
    > I hope somebody else can help you.
    >
    > Good luck!
    >
    > Regards,
    > Erwin Moller
     
    hennakapoor, Jan 23, 2005
    #5
  6. hennakapoor

    mecak

    Joined:
    May 31, 2006
    Messages:
    1
    Hi,
    I am facing the same problem but with google,
    Please let me know how did you fix the problem, thank you very much...
    I searched lot of forums but no code or help available

    All the best
     
    mecak, May 31, 2006
    #6
  7. hennakapoor

    chetansehgal

    Joined:
    Apr 1, 2008
    Messages:
    1
    Problem!







    Hi,
    actually i am a fresher to all this, and dont know much about scripting!. i use .net enviroment to make applications in C#..so i wanted to know about how to get auto logged in into a web site?? means like clicking a link and then the ID and Password is aleady provided somewhere, so get in.

    can u help me on the topic??
    Thank you very much in advance!!!
    hope to get your reply!!
     
    chetansehgal, Apr 1, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    1
    Views:
    779
    Guest
    Jun 29, 2004
  2. David Smithz
    Replies:
    17
    Views:
    14,002
    mohammedsk
    Aug 28, 2006
  3. Replies:
    0
    Views:
    609
  4. Tim Williams

    Re: Automatic login to website (newbie)

    Tim Williams, May 15, 2007, in forum: Python
    Replies:
    1
    Views:
    967
  5. rockdale
    Replies:
    5
    Views:
    729
    Chad Scharf
    Jul 5, 2007
Loading...

Share This Page