Re: [Hampshire] obfuscated code

Top Page

Reply to this message
Author: Tony Whitmore
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] obfuscated code
john lewis wrote:
> On Sun, 13 Mar 2011 17:36:28 +0000
> Daniel Llewellyn <diddledan@???> wrote:
>
>> if you want a quick decode you can use php:
>>
>> cat file_containing_html | php -r "print
>> html_entity_decode(file_get_contents('php://stdin'));"
>
> Nope! I get
> bash: php: command not found


At a guess that's because you don't have the PHP CLI program installed.
It's in the package "php5-cli" on Debian and is invocated using the "php5"
command, not "php".

> I also tried Hugo's sed suggestion and got another error
>
> sed: couldn't open file script.sed: No such file or directory


You need to save the set of filters that Hugo provided to a file called
"script.sed" which is then applied to the input file.

Tony