This is a discussion on WTF - Some PHP Obfuscation. within the General Chat forums, part of the Lounge category; Today I was messing about in PHP and wondered how confusing you could make some PHP code. I had seen ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||||
| Today I was messing about in PHP and wondered how confusing you could make some PHP code. I had seen (as many may have) very obfuscated Perl code and the like but I never thought you could do it with PHP. So, here is something I put together which outputs a little message. I have removed one character below, can you find which character is missing and what message is displayed? Code: $_='ca';${$_{1}}=8;${$_{0}}=chr(ord($_)-1);$_;${${$_{0}}{0}}=
ord('l')-100;$c{0}=chr(116>>$b-7);*$_;$a<<=($b%8==0);$_; $c.=
chr((2<<2<<($b>>2)<<2>>2)+13).chr(-7+(-$b+2*$a<<1));echo $c ;
|
| |||||
| I tried for a while but then gave up. Me PHP knowledge is too limited for that.
__________________ My Blog |
| |||||
| Code: $_='ca';${$_{1}}=8;${$_{0}}=chr(ord($_)-1);$_;${${$_{0}}{0}}=
ord('l')-100;$c{0}=chr(116>>$b-7);*$_;$a<<=($b%8==0);$_; $c.=
chr((2<<2<<($b>>2)<<2>>2)+13).chr(-7+(-$b+2*$a<<1));echo $c ;
well based on the code above - I removed a character and got Code: :-) |
| |||||
| Damn, I thought you had to add in a character. I knew that * looked out of place. |
| |||||
| Yes, you can just remove the * because the *$_; part is simply padding for that line. In the original code I had 7*$_; to pad out the line without any spaces, but there is a few uneccesary $_; just to pad out the lines. |
| ||||
| Surely a bit of a waste of resources to actually RUN such a thing, though? |
| Tags |
| obfuscation, php, wtf |
| Thread Tools | |
| Display Modes | |
|
|
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Apache, PHP | ziycon | Coding Help | 2 | 15-02-2007 10:54 AM |
| php, mysql & .asp from same laptop | alex | Server / Technical Administration Tips and Queries | 11 | 16-10-2006 06:01 PM |
| Do Php Accelerators Make Any Difference? | blacknight | Coding Help | 2 | 13-09-2006 11:28 PM |
| Ioncube encoded PHP Scripts | georgiecasey | Coding Help | 3 | 29-08-2006 11:49 AM |
| PHP on windows | louie | Coding Help | 20 | 22-02-2006 06:25 PM |
| ||||||||
| | ![]() | |||||||