News Feed
Jobs Feed
Sections




News Archive
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

DevShed: PHP Statements and Beginning Loops

Reddit.com: Where can I find a free place to edit PHP code and see the results?

Rafael Dohms' Blog: Book Review: The Art of Readable Code

Vid Luther's Blog: Using your Mac as a local web development environment.

Smashing Magazine: Why Coding Style Matters


Community Events











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


unittest development podcast series introduction interview tool testing framework zendframework2 opinion conference application language functional phpunit release community code example

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