Sinisterly
getting .php file source - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Hacking (https://sinister.li/Forum-Hacking)
+--- Forum: Website & Server Hacking (https://sinister.li/Forum-Website-Server-Hacking)
+--- Thread: getting .php file source (/Thread-getting-php-file-source)



getting .php file source - Jakub - 08-25-2017

Hi, i know this is stupid question but is there any chance to get php source trough www browser or any program? Thanks.


RE: getting .php file source - Blink - 08-25-2017

Nope, PHP is a server side language so you can only view it if you have access to the server.


RE: getting .php file source - Jakub - 08-25-2017

I saw once a www server who output source trough ".phps".

So i'm guessing i need get into server, thanks.


RE: getting .php file source - ghost-287 - 08-25-2017

https://stackoverflow.com/questions/1319603/how-to-view-php-on-live-site

you can see the HTML/javascript/css files since they are static files but not PHP code.
you have to have server access or direct file access to view the source of PHP

and about phps:
you need to save your .php files with a .phps for their source to be displayed == if the admin of that website saved "php" files as "phps" [example: index.php ==> index.phps ] so in this case u can see the source code of that file


RE: getting .php file source - Jakub - 08-25-2017

okay, thanks for help. Smile


RE: getting .php file source - Darkbyte - 08-25-2017

(08-25-2017, 09:52 PM)Jakub Wrote: I saw once a www server who output source trough ".phps".

So i'm guessing i need get into server, thanks.


That server had been setup incorrectly i found the same thing with a facebook game called pot farm once.

Another example of a server setup wrong is http://saddleworthcheese.co.uk/ , click on any of the links ending.asp and the source code will download giving you the sites database details ect. This is just a shitty setup webserver.


RE: getting .php file source - ghost-287 - 08-25-2017

you are welcome ^^
dont hesitate if u need other things


RE: getting .php file source - mothered - 08-26-2017

(08-25-2017, 10:16 PM)Darkbyte Wrote:
(08-25-2017, 09:52 PM)Jakub Wrote: I saw once a www server who output source trough ".phps".

So i'm guessing i need get into server, thanks.


That server had been setup incorrectly i found the same thing with a facebook game called pot farm once.

Another example of a server setup wrong is http://saddleworthcheese.co.uk/ , click on any of the links ending.asp and the source code will download giving you the sites database details ect. This is just a shitty setup webserver.

Poorly configured servers, yes. There's a lot that may be exposed. I come across many daily.

Well/properly configured, no.