Need some webpage help

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

Post Reply
User avatar
Shadowhawk
Jedi Knight
Posts: 669
Joined: 2002-07-03 07:19pm
Location: Western Washington
Contact:

Need some webpage help

Post by Shadowhawk »

I pretty much use my webspace on Comcast just to store images.
Comcast, in their infinite wisdom of deciding what's best for their users, have set up the server so that if there is no index.html file (or whatever equivilents they have in their list), it displays a 'User has not moved in' page. No plain ol' directory listings are allowed.
This is a pain in my ass, since I've got to log in via FTP to remind myself what files I have there. Making a new index.html file for every time I add files is an even bigger pain.
So, I want a work around. I'd like some piece of code I can drop into a generic index.html file that'll list every file in the directory, just like a normal listing. Comcast's support forums were worthless except for informing me that my scripting options are quite limited (more of that wonderful Comcast service package).

So, anyone have some code, ideas, tips, or a good place I can go to find such code?
Shadowhawk
Eric from ASVS
"Sufficiently advanced technology is often indistinguishable from magic." -- Clarke's Third Law
"Then, from sea to shining sea, the God-King sang the praises of teflon, and with his face to the sunshine, he churned lots of butter." -- Body of a pharmacy spam email

Here's my avatar, full-sized (Yoshitoshi ABe's autograph in my Lain: Omnipresence artbook)
User avatar
Mad
Jedi Council Member
Posts: 1923
Joined: 2002-07-04 01:32am
Location: North Carolina, USA
Contact:

Post by Mad »

Can you display file listings on subdirectories?
Later...
User avatar
Shadowhawk
Jedi Knight
Posts: 669
Joined: 2002-07-03 07:19pm
Location: Western Washington
Contact:

Post by Shadowhawk »

Mad wrote:Can you display file listings on subdirectories?
Nope. It puts that 'not moved in' page for every subdir you create.
Shadowhawk
Eric from ASVS
"Sufficiently advanced technology is often indistinguishable from magic." -- Clarke's Third Law
"Then, from sea to shining sea, the God-King sang the praises of teflon, and with his face to the sunshine, he churned lots of butter." -- Body of a pharmacy spam email

Here's my avatar, full-sized (Yoshitoshi ABe's autograph in my Lain: Omnipresence artbook)
User avatar
Vertigo1
Defender of the Night
Posts: 4720
Joined: 2002-08-12 12:47am
Location: Tennessee, USA
Contact:

Post by Vertigo1 »

I'd say its time for you to ring them up and give them an earfull. Absolutely no respectable webhost would do something so damned stupid.
"I once asked Rebecca to sing Happy Birthday to me during sex. That was funny, especially since I timed my thrusts to sync up with the words. And yes, it was my birthday." - Darth Wong

Leader of the SD.Net Gargoyle Clan | Spacebattles Firstone | Twitter
User avatar
Dalton
For Those About to Rock We Salute You
For Those About to Rock We Salute You
Posts: 22637
Joined: 2002-07-03 06:16pm
Location: New York, the Fuck You State
Contact:

Post by Dalton »

They're an ISP.
Image
Image
To Absent Friends
Dalton | Admin Smash | Knight of the Order of SDN

"y = mx + bro" - Surlethe
"You try THAT shit again, kid, and I will mod you. I will
mod you so hard, you'll wish I were Dalton." - Lagmonster

May the way of the Hero lead to the Triforce.
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

Vertigo1 wrote:I'd say its time for you to ring them up and give them an earfull. Absolutely no respectable webhost would do something so damned stupid.
Actually, there are security reasons for this, so many webhosts do not let you get directory access.
User avatar
Shadowhawk
Jedi Knight
Posts: 669
Joined: 2002-07-03 07:19pm
Location: Western Washington
Contact:

Post by Shadowhawk »

phongn wrote:
Vertigo1 wrote:I'd say its time for you to ring them up and give them an earfull. Absolutely no respectable webhost would do something so damned stupid.
Actually, there are security reasons for this, so many webhosts do not let you get directory access.
Yes, and that's presumably why they did it. Really annoying that they didn't make it a user-configurable option, though.
Shadowhawk
Eric from ASVS
"Sufficiently advanced technology is often indistinguishable from magic." -- Clarke's Third Law
"Then, from sea to shining sea, the God-King sang the praises of teflon, and with his face to the sunshine, he churned lots of butter." -- Body of a pharmacy spam email

Here's my avatar, full-sized (Yoshitoshi ABe's autograph in my Lain: Omnipresence artbook)
User avatar
Mad
Jedi Council Member
Posts: 1923
Joined: 2002-07-04 01:32am
Location: North Carolina, USA
Contact:

Post by Mad »

So what kind of scripting options do you have? You can't use straight HTML to give you a file listing. (You'd have to update it manually as you suggested... if you only add or removes files every now and then it shouldn't be too difficult to do that.)
Later...
User avatar
Pu-239
Sith Marauder
Posts: 4727
Joined: 2002-10-21 08:44am
Location: Fake Virginia

Post by Pu-239 »

Try making a file named .htaccess with "Options +Indexes" in it... and upload it. Most likely they disabled those for security reasons though.

ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer


George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
User avatar
Pu-239
Sith Marauder
Posts: 4727
Joined: 2002-10-21 08:44am
Location: Fake Virginia

Post by Pu-239 »

Or you can get someone to convert this script to windows bash and run it in a copy of your FTP directory on your hard drive before updating:

Code: Select all

#!/bin/bash
ls|sed -e 's/^\(.*\)/<a href="\1">\1<\/a><br>/g'>/tmp/list
echo '<html>
<head>
<title>List of files</title>
</head>
<body>'>/tmp/head
echo '</body>
</html>'>/tmp/tail
cat /tmp/head /tmp/list /tmp/tail>list.html
rm /tmp/list
rm /tmp/head
rm /tmp/tail
I love *nix and sed (v4).

ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer


George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
User avatar
Shadowhawk
Jedi Knight
Posts: 669
Joined: 2002-07-03 07:19pm
Location: Western Washington
Contact:

Post by Shadowhawk »

Mad wrote:So what kind of scripting options do you have? You can't use straight HTML to give you a file listing. (You'd have to update it manually as you suggested... if you only add or removes files every now and then it shouldn't be too difficult to do that.)
Not really sure what sort of scripting I'm limited to. Pretty sure that CGI is an option. If java/javascript needs any server-side stuff (I'm quite ignorant on it), I'd imagine that's not allowed, either.
Pu-239 wrote:Try making a file named .htaccess with "Options +Indexes" in it... and upload it. Most likely they disabled those for security reasons though.
Yeah, looks like they have. Won't allow any file that starts with a .
Shadowhawk
Eric from ASVS
"Sufficiently advanced technology is often indistinguishable from magic." -- Clarke's Third Law
"Then, from sea to shining sea, the God-King sang the praises of teflon, and with his face to the sunshine, he churned lots of butter." -- Body of a pharmacy spam email

Here's my avatar, full-sized (Yoshitoshi ABe's autograph in my Lain: Omnipresence artbook)
User avatar
Comosicus
Keeper of the Lore
Posts: 1991
Joined: 2003-11-23 06:33pm
Location: on the battlements of Sarmizegetusa
Contact:

Post by Comosicus »

If you are allowed PHP it's not so difficult.
Not all Dacians died at Sarmizegetusa
Post Reply