Any way to find all php files on a website?

TheGreyMatter

BANNED
Joined
Mar 23, 2011
Messages
3,697
Reaction score
4,060
Is there any way to find links of all php files uploaded on a website.

For example,
lets say http://www.abc.com is a website and it contains few php pages like abc.com/1.php and abc.com/2.php etc...

So, any software which can find all these files?
 
There are spiders/scrapers that can do this. But that won't guarantee that you get all the php pages. It's quite possible to run php pages with different extensions to hide them from people trying to find them. eg index.html could actually be a php page and you won't know by looking at the extension.
 
You could try using the "site" and "inurl" search commands with Google.

So for the site command you would use the domain you want to look up and in the "inurl" command you would use ".php"

Sorry for the funky explanation.

I tried inserting the exact command you should use and it would not let me post it. I guess since my post count is low or something.

I would think you could use this footprint with scrapebox but not positive. I'm not a heavy SB user.

You would also be limited to the top 1000 results.
 
You can find the pages themselves, but you won't actually see any of the php code. That gets generated on the server and returned as HTML to your browser.
 
If the links to the other pages are on the page, you can just use a sitemap generator.
 
This is almost impossible ...!!! Because ... PHP is server side language ...! whatever tool you use even spiders/scrapers , when the page is requested server will execute that page & it'll be converted into static html when it comes to client like browser or whatever ......!!! PHP or any server side language code can never escape outside server until there is some downloader(cpanel/ftp/shell etc.) that allows you to save pages to your computer without executing that page ...!!!

This doesn't matter unless the person is masking the .php extension. If the page is being served as .php, it can be crawled. However if the page were say a wordpress URL that is made to not look it is PHP generated, then you'd be right in that there's no real way to tell that it is HTML / PHP.
 
There's an application from Acunetix called Web Vulnerability Scanner that has a really nice tool that can do this quite nicely... however, it sends a lot of http requests which any good web administrator would oversee and become suspicious.

I've done it, quite an amazing tool :o
 
This doesn't matter unless the person is masking the .php extension. If the page is being served as .php, it can be crawled. However if the page were say a wordpress URL that is made to not look it is PHP generated, then you'd be right in that there's no real way to tell that it is HTML / PHP.

A PHP can't be crawled even if extension is not masked ..... code between <?PHP... ?> can't go outside server .... PHP interpreter will translate it into html ..
 
Last edited:
A PHP can't be crawled even if extension is not masked ..... code between <?PHP... ?> can't go outside server .... PHP interpreter will translate it into html ..

He wasn't asking for the actual code, I think most of us know that you cannot retrieve server side code. He was asking for just the existence of the PHP file.
 
If there is no masking then the simple google search using "filetype:" keyword will show all ... If there is masking then he have to first know which is web app , if it is php based than simply all pages will be php .
 
Back
Top