Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Directory Listing Script

    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,
    Kam

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,596
    Thanks
    78
    Thanked 4,387 Times in 4,352 Posts
    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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Tags for this Thread

    Posting Permissions

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