How to run a php script which contains a pdf
jpb at entel.ca
Wed Nov 4 18:44:12 UTC 2009
Jonathan Ryshpan wrote:
> On Sat, 2009-10-31 at 21:29 +0100, Athmane Madjoudj wrote:
>> On Sat, Oct 31, 2009 at 9:25 PM, Nigel Henry
>> <cave.dnb2m97pp at aliceadsl.fr> wrote:
>>> I was trying to read an online tool catalogue, and noticed a PDF button at the
>>> bottom of the webpage. Clicked on it, and it opened the dialog box to
>>> download. What has been downloaded though is a .php script (27.3MB).
>>> The properties shows that it contains a pdf document, but I've no idea how to
>>> run it, open it, or whatever needs to be done, to get to see the PDF.
>>> Any suggestions folks.
>> Try to rename it:
>> mv FILE_NAME.php FILE_NAME.pdf
>> and open it with Evince
>> Athmane Madjoudj
> No need to rename it, just run
> $ evince FILE_NAME.php
> Of course
> $ file FILE_NAME.php
> will always give you a reasonable guess about what the file format
> really is.
What you may have is a PHP page that contains a link to, or an embedded,
Open the file with a text editor and see if you get PHP code. If you do,
then just extract the PDF or the link.
If you can't read it, you may just have a PDF file with the wrong
extension and just have to rename it.
If the renamed file does not open with a PDF reader, you probably have a
compiled PHP file (used to secure PHP pages as it purportedly prevents
people from pilfering PHP products <deep breath>). In this case you will
have to view the file in a browser and hope it doesn't contain anything
malicious. Do it as an unprivileged user to be safe.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users