View Full Version : Directory Listing Script

07-20-2010, 03:11 AM
Hello all,
I will start off by saying that i have little javascript knowledge. Ok, now that is out of the way, lol, I want to make a program or firefox extension or something to that nature that will build a Web Server Directory Index by scanning the server for all files and displaying them like this:

I don't know where to start, or if javascript is capable of doing this. (if not could you suggest a language better equipped to do this? )

The reason for such a project is for my own personal security reasons. *gets on soap box* I want to know exactly what is going on behind a website before i let it run a bunch of code that could potentially harm my computer (i listen to security now, and i know how bad some Javascript can be) and if i am going to a website i don't know, i wanna scan, and see for myself if there is malicious code running.
Now i know what your thinking... "hey kam... there is such a thing as a firewall / virus protection" but i am the kind of guy that want's to see for myself instead of trusting someone else program to tell me what is good and bad.... *gets down from soap box*

any help would be absolutely amazing.
Thx in advance,

Old Pedant
07-20-2010, 03:33 AM
For the very reasons you listed, this is not possible with JavaScript.

JavaScript has NO CAPABILITY to see the file structure on the server. It's a permissions issue.

Now, you *CAN* opt to allow users to see your directory structure. Web servers do allow something called "directory browsing." But don't do it! Now all web users can see all that info that you'd rather keep hidden!

You *can* do this with any of the server-side systems: ASP, JSP, PHP, CGI, etc. And of course you could then also password protect it so that only you could login and check the status.

Although I don't know any file system that give you a "Rev" or "Author" or "Last log entry" value. That looks suspiciously like a dump out of a database that is keeping track of the files in parallel with the actual file system.