Results 1 to 21 of 21

Thread: logging into a website automatically

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    Northern Maine
    Posts
    281

    logging into a website automatically

    Hello all,

    I have this certain website that I goto fairly often that requires me to login with a username and password every time I go. The site does not accept cookies, and I don't like using the windows password cache. What I am looking for is a way to execute some HTML code and automatically hand it the username and password so that I don't have to log in every time. Does anyone have any ideas??

    Thanks.

  2. #2
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141
    If you want to save it in your favorites you can then edit the url property of the favorite to pass it the username and password along with the url. The format is something like this. http://username:password@www.vbforums.com

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    Northern Maine
    Posts
    281
    tried that, didn't work....still prompts me for the username and password...

  4. #4
    Addicted Member VBGangsta's Avatar
    Join Date
    Aug 2003
    Location
    New York
    Posts
    219
    Yeah i whould love to know this also. I think u have to use some sort of java script.
    -Rob

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,173
    Originally posted by MarkT
    If you want to save it in your favorites you can then edit the url property of the favorite to pass it the username and password along with the url. The format is something like this. http://usernameassword@www.vbforums.com
    Can you show me an example of where that would work?



    mbaker, perhaps you could pass the username and password in a query string to the login page for the site you're trying to visit.

    E.g. http://www.vbforums.com/login.php?us...password=sdflk

    It depends upon how they have coded the login page though. If they used globals, then it should work.

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,173
    Hey hey, guess what...

    it works with vbforums!

    http://www.vbforums.com/member.php?a...sword=password


    I *think* using globals here is a bad security flaw, right? Anyways, if you're comfortable posting the URL, we can take a look at it.

  7. #7
    Addicted Member VBGangsta's Avatar
    Join Date
    Aug 2003
    Location
    New York
    Posts
    219
    THers 2 textboxes and a login button. can u help?

    PHP Code:
    html>
    <
    head>
    <
    title>Login</title>
    </
    head>
    <
    body bgcolor="#697d65">
    <
    LINK REL="stylesheet" TYPE="text/css" HREF="../style.css"><P ID="text_r" align="center">
            <
    LINK REL="stylesheet" TYPE="text/css" HREF="../style.css">
            
            <!-- 
    This is the first screen when a user sees when he is not logged in -->
            <
    form action="/login/login.php" method="post"><input type="hidden" name="PHPSESSID" value="027846ed275785f31c1baf81f88d420a" />
            <
    table align="center" border="0" cellspacing="0" cellpadding="0" width="135" bgcolor="#697d65">
            <
    tr><td><span ID="text_r">Username:<BR>
            <
    input type="text" name="uname" maxlength="40" ID="textbox"><BR>
            
    Password:</span><BR>
            <
    input type="password" name="passwd" maxlength="50" ID="textbox">
            </
    td></tr>
            <
    tr><td colspan="2" align="right">
            <
    input type="submit" name="submit" value="Login">&nbsp;
            </
    td></tr>
            </
    table>
            </
    form>

            <
    p align="center"><a href="../faq.html?PHPSESSID=027846ed275785f31c1baf81f88d420a" target="mainframe">Player's Guide</a></p>

    </body>
    </html> 
    -Rob

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,173
    The URL would be:

    http://www.sitename.com/login/login....asswd=whatever


    See if it works, by testing it out in IE right now. If it does, then you could make it work from your app.

  9. #9
    Fanatic Member MikkyThomeon's Avatar
    Join Date
    Oct 2002
    Location
    At work...
    Posts
    648
    haha

    I have done this before. My app logs into a website and retrieves info from certain pages within the site. All you have to do is pass the request string. I then extended this idea to download information about people on the net into one large snooping database. Snooping is what my company does by the way, we use the information legitimately for legal purposes.

  10. #10
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,173
    Originally posted by MikkyThomeon
    Snooping is what my company does by the way, we use the information legitimately for legal purposes.
    How can information retrieved from another source, without the user's consent, be "legitimately" used for "legal" purposes?

  11. #11
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068
    Originally posted by mendhak
    How can information retrieved from another source, without the user's consent, be "legitimately" used for "legal" purposes?

    Oh, you know, stalking, identity stealing, blackmail, spam that says "Click here to find your neighbors deep, dark secrets about sexual encounters with Cheerios & Tony the Tiger & a dildo made of mostly dampened footpowder!!!"

    You know, legit stuff. .

  12. #12
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,173
    Oh right...

    I've ordered my gonad reduction pills from Roseanne's "Kinky" store, I believe they will be delivered in Jane Fonda's nostrils.

  13. #13
    Fanatic Member MikkyThomeon's Avatar
    Join Date
    Oct 2002
    Location
    At work...
    Posts
    648

    Dont assume



    You won't release an app without testing it. You dont assume that an app will work until you have tested it. Similarly don't assume that I am part of that genre. I work for a debt collection agency and write tracing utilities to track down evasive debtors by any electronic means available. The site I metioned lists people who have defaulted on micro loans. I grab this info to help compile a profile about the debtor.

    Coming back to the question, the easiest way to check the output of the form submission is to copy the html form and then change the form's output to an asp page that has the following code:

    VB Code:
    1. Response.write request.querystring

    The target page will display the URL.

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    Northern Maine
    Posts
    281
    hey all,

    I can't post the link because it is a site on my company intranet. I talked to the web team to see if they could help me, they are too "busy".

    Basically, the login page has two text boxes, the contents of the text boxes gets passed to at javascript and then authenticates to a DB of some sort (probably sql server).

  15. #15
    Addicted Member VBGangsta's Avatar
    Join Date
    Aug 2003
    Location
    New York
    Posts
    219
    that didnt work but i found a differnt way to put the text in a textbox with documant.all(uname) = "username" But now i need to know how to press that login in button. Any one know how?
    -Rob

  16. #16
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,173
    Originally posted by VBGangsta
    that didnt work but i found a differnt way to put the text in a textbox with documant.all(uname) = "username" But now i need to know how to press that login in button. Any one know how?
    document.formname.submit();

  17. #17
    Addicted Member VBGangsta's Avatar
    Join Date
    Aug 2003
    Location
    New York
    Posts
    219
    Im not sure what the form name is, the code im talking about is posted in an above post maybe you can see it. But how do i put that in my code? I put the other thing in like : web1.Document.All("uname").Value = "user" Thanks
    -Rob

  18. #18
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,173
    Originally posted by VBGangsta
    Im not sure what the form name is, the code im talking about is posted in an above post maybe you can see it. But how do i put that in my code? I put the other thing in like : web1.Document.All("uname").Value = "user" Thanks

    In the code you posted above, I see:

    Code:
      <form action="/login/login.php" method="post">
    Whoever created this page, has not given a name to this form. So you would submit it like this:

    Code:
    web1.Document.forms[0].submit();

    With or without the semicolon...

  19. #19
    Addicted Member VBGangsta's Avatar
    Join Date
    Aug 2003
    Location
    New York
    Posts
    219
    Thee 0 is underlined and says identifyer expected.
    -Rob

  20. #20
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,173
    Isn't it possible for you to go in, and give the <form> a name?


    Anyways, instead of the square brackets, [], try ().

  21. #21
    Addicted Member VBGangsta's Avatar
    Join Date
    Aug 2003
    Location
    New York
    Posts
    219
    doesnt work...
    -Rob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width