I owe more “Speaking in tongues” stuff, but I think I may have bored everyone to tears. This, by pointed contrast, is purely for fun.
Copy this code:
<?PHP $thepath = $_SERVER['SERVER_NAME']; $dir = '*'; if ($Bfolder) $dir = "$Bfolder/*"; foreach (glob($dir, GLOB_ONLYDIR) as $filename) { if (!$Bfolder) echo ("<BR>"); ?> <a href="<?PHP echo($filename); ?>" target="_blank"> <?PHP echo($filename); ?></a><BR> <?PHP $URL = urlencode($filename); include ("http://$thepath/windex.php?Bfolder=$URL"); } ?>
and paste it into a text file.
Save the file with the name “windex.php”.
FTP it into the top level of your file server.
Then go here:
http://MyServer.com/windex.php
substituting the name of your server for “MyServer”, of course.
What are you seeing? The entire directory tree of your file server expressed as links. Each sub-hierarchy of folders is visually separated by a space, just to make things pretty. Each one of those links will work, opening into a web page if the folder contains an HTML “index” file, or to a Unix like directory representation if not.
Just a toy, just for fun. I’d explain it to you, but then you’d have to kill me.
Technorati Tags: blogging, real estate, real estate marketing, technology
Todd Carpenter says:
It brought up some links that I’d prefer not to publicize, so I took it back down. Interesting though. Does it have a time out feature? Only about the first 25% of mariah.com came up.
January 12, 2008 — 11:10 pm
Greg Swann says:
> Does it have a time out feature? Only about the first 25% of mariah.com came up.
It might time out on your server. Depending on how deep your directory trees run, it could also run out of sessions. It’s reentrant, so it calls itself for each new directory it finds. I rarely work more than four or five levels down, but there is no limit to how deep a hierarchy can go. It’s plausible to me that you could run out of Apache sessions before you bubble back up to the top level.
January 12, 2008 — 11:30 pm
Todd Carpenter says:
That’s probably the case. I’m going to play with it some more. on some of my other sites.
January 12, 2008 — 11:40 pm
Dru Bloomfield says:
I tried it too… found some directories and files that I meant to delete earlier, but never got around to. My assumption is that anything that comes up in this tree search is “visible” on the ‘net, if someone wanted to get there.
January 13, 2008 — 7:53 am
Greg Swann says:
> My assumption is that anything that comes up in this tree search is “visible” on the ‘net, if someone wanted to get there.
That’s correct. Spiders are going there, even if your say not to in robots.txt.
This is not why I wrote this — I needed an easier way to get to web sites we’ve done in the past — but you should assume that everything on your file server is accessible to bad guys unless it is stored in encrypted form. The net is not secure and WordPress, in particular, is wide open.
January 13, 2008 — 8:00 am
Andy Kaufman says:
Thanks Greg. Keep em coming.
I can feel my brain stretching.
January 13, 2008 — 9:28 am
Dan Green says:
Playing in WordPress is much more fun than playing in TypePad. I can’t imagine what the less-than-technologically-inclined do when they want to tweak their blogs.
I guess they hire Jimmy Tomatos…
January 14, 2008 — 11:36 am