JavaScript/Firefox - Auto login script?

Question:I'm trying to create a script to automatically login into my ADSL router. Now, the line looks somewhat like this:

window.location.href='http://username:password@192.1...
(where192.168.1.1 is the IP address of the router and "username" and "password" are the username and password, respectively)

But the Firefox confirmation dialog:

You are about to log into the site "192.168.1.1" with the username "username"

pops up when I run the script. Therefore, I cannot log in unless I manually press the 'OK' button in the dialog. Is there any way out, either by modifying a Firefox setting or using javascript to do the confirmation automatically?

Answers:
I use firefox to config my routers... I think passing a user id and password is a bad idea, and so do the firefox developers.

Firefox does a good job of remembering username & password... use it.

'http://192.168.1.1" instead.

I like Doug's Answer... does it work for you??

I didn't suggest it because I felt it would be a security problem!

the perl trick would not open the site in firefox, but a separate 'pseudo-browser' where you can do your dirty work!

I normally just use bookmarks for my routers... are you trying to do some automated re-configs or options?

perl's LWP module makes a 'pseudo-browser' that you can do almost anything with! But it's a bunch of code.


1. Open Firefox

2. Visit about:config

3. Find the entry network.http.phishy-userpass-l...

4. Set its value to 255

More FireFox Questions & Answers...
  • from yesterday my internet connection break and go on when i use firefox why?
  • problems with firefox?
  • How can I open files from my computer with a web page I created also on my computer using HTML with Firefox?
  • How do I embed a pic within an email instead of attaching it using Mac osx?
  • How to download Adobe Flash Player with Firefox?
  • INternet Explorer VS. Firefox?? please help!!?
  • Yahoo Homepage?
  • CAn anybody tell me the good sites from where i can download the following things?
  • This article contents is create by this website user, FireFoxAnswer.com doesn't promise its accuracy.