News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Gareth Heyes' Blog:
Non alphanumeric code in PHP
September 23, 2011 @ 10:05:47

Gareth Heyes has tried out an interesting experiment - running non-alphanumeric code in PHP using only octal escapes.

So a small php shell was tweeted around and it inspired me to investigate a way to execute non-alphanumeric code. First off I started with the idea of using octal escapes in PHP and constructing the escape so for example: 107 is "G" if I could construct the "107" and add the backslash to the beginning maybe I could construct "G".

A snippet of example code is included showing his octal-based code for creating a "G" (6 lines of pluses, parentheses, equals and a few more characters). By doing some trickery with bitwise operators on strings, he was able to combine characters and make the string "GET". Pretty clever, even if it's not entirely practical.

0 comments voice your opinion now!
nonalphanumeric code shell loop octal


blog comments powered by Disqus

Similar Posts

Anthony Ferrara: Beyond Clean Code

Volker Dusch's Blog: Textual code coverage information for PHPUnit

Zend Developer Zone: Improving Code Quality with Flash Builder 4 and PHPUnit

Christian Wenz's Blog: phpa-norl, a phpa port for Mac OS X and Windows

PHP in Action Blog: Bad code is good for you?


Community Events











Don't see your event here?
Let us know!


project package facebook introduction podcast hhvm language performance example hack install unittest release security component framework database symfony2 application composer

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework