Ask Experts Questions for FREE Help !
Ask
    cozoDOP2's Avatar
    cozoDOP2 Posts: 112, Reputation: 0
    Junior Member
     
    #1

    Nov 22, 2010, 09:35 PM
    How do I make a Javascript or some script to automatically log to secure website?
    An annoying website at work we use it to check uploaded files. Well, it is set up to log you off every few minutes.. so we have to keep entering the same thing . I was wondering if there was a way to login automatically using a script , whenever you go to the login page.

    I only know javascript.. do I have to learn something else?
    ITstudent2006's Avatar
    ITstudent2006 Posts: 2,243, Reputation: 329
    Networking Expert
     
    #2

    Nov 22, 2010, 09:58 PM
    http://www.computing.net/answers/pro...ipt/14250.html

    Notsure if this helps but its got useful info.
    ITstudent2006's Avatar
    ITstudent2006 Posts: 2,243, Reputation: 329
    Networking Expert
     
    #3

    Nov 22, 2010, 10:44 PM

    I have played with the script for Facebook and I've got it almost figured out. I can edit the script to auto fill my username and password but I'm still working on it submitting the login.

    That way I can put the edited script on my desktop as an html icon and clickand auto login to Facebook.

    Ill let you know if I figure it out!
    ITstudent2006's Avatar
    ITstudent2006 Posts: 2,243, Reputation: 329
    Networking Expert
     
    #4

    Nov 22, 2010, 10:48 PM
    However, I am using Chrome as my browser, when I open it with IE I get active X/script security messages. Hmm
    objectundefined's Avatar
    objectundefined Posts: 45, Reputation: 2
    Site Dev
     
    #5

    Jan 22, 2011, 12:26 AM
    In short, if you're using a modern browser like chrome, safari or Firefox, you would use vanilla javascript to find the form elements you care about, edit their values, and then submit the form. The function you'd use is document.querySelectorAll().

    Example:
    Code:
    document.querySelectorAll('form#login input#username')[0].value = " *YourUserName* ";
    document.querySelectorAll('form#login input#password')[0].value = " *YourPassword* ";
    
    document.querySelectorAll('form#login')[0].submit();
    
    // or document.getElementById('login').submit();
    in order to execute this safely from the URL bar, you should wrap it in a closure.

    Code:
    javascript:(function(){ ... })()

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Am I just using him to make myself feel secure and not lonely? [ 4 Answers ]

Okay so since the very beginning I have had doubts and have just kept him around to see what happens.most of the reason I had doubts is because I care too much about what other people think so I felt embarrassed to be in any kind of relationship with him so I kept it behind closed doors... but I...

How can I secure my website? [ 3 Answers ]

I recently found out about this wonderful websites and since then I have been following information's and computer tips, I have a big problem that I will forever be grateful if you can assist me with, I registered an online based company recently with 4 other friends and later we added another...

How can I make this javascript thing work in a cell? [ 5 Answers ]

Check out this expanding list thing I've got going here: FAQ Test Page How can I get it to work inside the table that's below it? I've tried pasting it all in there but after doing so it does not work. Yep, total javascript noob here :p Thanks!


View more questions Search