getting files list in a directory with index.html | php file

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

getting files list in a directory with index.html | php file

Post by raghavan20 »

Normally in a site like
http://somehost.com/

there should be an index.html of index.php which actually shows up whenever we type in the website names and prevents us from knowing the other files in the same directory. I want to know whether there is a way to find all the files in a directory which has got either index.html or index.php file.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

By hacking in and using a serverside script to run a directory listing or modifying httpd.conf to remove index.html as an index page


What's the legit purpose for this, there might be a better solution...
MinDFreeZ
Forum Commoner
Posts: 58
Joined: Tue Feb 14, 2006 12:28 pm
Location: Lake Mary, FL

Post by MinDFreeZ »

haha, yea..... get the ftp username and password?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

There simply is no definitive answer for your question because there is no such functionality in http...
Sometimes requesting a robots.txt file does miracles.. Certainly if you use Google/2.X as useragent header..
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

for the simplest and for the most legitimate purpose, I want to see all files in the directory to invoke them by listing not by using URL. can you now give me one method on how to do this?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

there is none on a site you do not own. On a site you own, you can either FTP in or if the script is local, list the files.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

All you did just now was restate your question, I was asking because there is no legitimate reason to list files on a domain you do not own that are not public. There is also no way to do this over the http protocol as we already mentioned so no matter what your reason is we can not help you do this. I asked for a reason so that we could try to think of a better solution to your problem.
Post Reply