Automatic login script for a website on windows machine?

后端 未结 5 2503
悲哀的现实
悲哀的现实 2020-12-12 16:27

I saw some guy had a file (I guess a batch file). On clicking of the batch file he was able to log in to multiple sites. (Perhaps it was done using VB.)

I looked for

5条回答
  •  一个人的身影
    2020-12-12 17:05

    From the term "automatic login" I suppose security (password protection) is not of key importance here.

    The guidelines for solution could be to use a JavaScript bookmark (idea borrowed form a nice game published on M&M's DK site).

    The idea is to create a javascript file and store it locally. It should do the login data entering depending on current site address. Just an example using jQuery:

    // dont forget to include jQuery code
    // preferably with .noConflict() in order not to break the site scripts
    if (window.location.indexOf("mail.google.com") > -1) {
        // Lets login to Gmail
        jQuery("#Email").val("youremail@gmail.com");
        jQuery("#Passwd").val("superSecretPassowrd");
        jQuery("#gaia_loginform").submit();
    }
    

    Now save this as say login.js

    Then create a bookmark (in any browser) with this (as an) url:

    javascript:document.write("");
    

    Now when you go to Gmail and click this bookmark you will get automatically logged in by your script.

    Multiply the code blocks in your script, to add more sites in the similar manner. You could even combine it with window.open(...) functionality to open more sites, but that may get the script inclusion more complicated.

    Note: This only illustrates an idea and needs lots of further work, it's not a complete solution.

提交回复
热议问题