Code encryption = funny solutions
Published 2005-09-13 06:09:04
Someone just emailed me to comment on something called phpcodelock, (google for it, I'm not going to advertise stupid products)..
It's always funny to see people try and encypt PHP source (or javascript/html for that matter.) As the reality is, encyption is only any good when the end user doesnt get hold of all the keys to open the door.
I've no idea how exactly the product above works (but I'm 100% sure it's not really going to work beyond a superficial look). But it looks similar to another funny effort I saw the other day. Someone used eval(base64_encode(".....")); - which basically had 10-16 nested calls to eval(base64_encode()) inside the data.. = a quick preg while loop on the code solved that one..
So to try and stop stupid people spending (or losing their) money on stupid products, here's a hackers guide to reading encypted PHP code
Step 1: open up the php source code (the one you download from php.net), look for any of the zend engine that parses PHP source, and stick a big printf() ( optionally to a file somewhere..) just before it's parsed.!!!!!!
Opps - that's it (there is only one step!) - almost all encryption methods fall foul of this.!!
Actually the reason someone asked me was because I hacked the apc source into bcompiler quite a few years ago, and since then Val Khokhlov has been doing an excellent job, fixing all my bugs, adding features and making it work with PHP5.
bcompiler does work to some degree as a encyption technique, as you would have great difficulty resurecting the original source code from the opcodes (although you could get something resembling the source out, with alot of work...).
But really, why bother... that's what copyright is for.!! The only justification I can imagine (having seen the crap hidden behind this stuff) is to hide away some horrifically bad code, that the Author was so embarressed to show to the world..
It's always funny to see people try and encypt PHP source (or javascript/html for that matter.) As the reality is, encyption is only any good when the end user doesnt get hold of all the keys to open the door.
I've no idea how exactly the product above works (but I'm 100% sure it's not really going to work beyond a superficial look). But it looks similar to another funny effort I saw the other day. Someone used eval(base64_encode(".....")); - which basically had 10-16 nested calls to eval(base64_encode()) inside the data.. = a quick preg while loop on the code solved that one..
So to try and stop stupid people spending (or losing their) money on stupid products, here's a hackers guide to reading encypted PHP code
Step 1: open up the php source code (the one you download from php.net), look for any of the zend engine that parses PHP source, and stick a big printf() ( optionally to a file somewhere..) just before it's parsed.!!!!!!
Opps - that's it (there is only one step!) - almost all encryption methods fall foul of this.!!
Actually the reason someone asked me was because I hacked the apc source into bcompiler quite a few years ago, and since then Val Khokhlov has been doing an excellent job, fixing all my bugs, adding features and making it work with PHP5.
bcompiler does work to some degree as a encyption technique, as you would have great difficulty resurecting the original source code from the opcodes (although you could get something resembling the source out, with alot of work...).
But really, why bother... that's what copyright is for.!! The only justification I can imagine (having seen the crap hidden behind this stuff) is to hide away some horrifically bad code, that the Author was so embarressed to show to the world..
Mentioned By:
forums.whirlpool.net.au : How to decrypt/decode IonCube PHP files - PHP - Web Development (1974 referals)
www.livejournal.com : lj2600: ioncube (885 referals)
google.com : ioncube crack (643 referals)
www.phpdeveloper.org : PHPDeveloper.org: PHP News, Views, and Community (501 referals)
www.codingforums.com : Protect PHP script - CodingForums.com (457 referals)
google.com : decode ioncube (381 referals)
google.com : crack ioncube (346 referals)
google.com : php code encryption (266 referals)
google.com : april (235 referals)
google.com : node/440 (230 referals)
google.com : ioncube decode (229 referals)
google.com : eval(gzinflate(base64_decode (210 referals)
google.com : december (205 referals)
google.com : funny php code (193 referals)
phparch.com : php | architect - The PHP Magazine for PHP Professionals (156 referals)
www.phpdeveloper.org : PHPDeveloper.org: Alan Knowles' Blog: Recovering encoded php files (149 referals)
google.com : encrypt php code (133 referals)
google.com : eval(gzinflate(base64_decode( (118 referals)
www.planet-php.net : Planet PHP (115 referals)
google.com : gzinflate(base64_decode (114 referals)
forums.whirlpool.net.au : How to decrypt/decode IonCube PHP files - PHP - Web Development (1974 referals)
www.livejournal.com : lj2600: ioncube (885 referals)
google.com : ioncube crack (643 referals)
www.phpdeveloper.org : PHPDeveloper.org: PHP News, Views, and Community (501 referals)
www.codingforums.com : Protect PHP script - CodingForums.com (457 referals)
google.com : decode ioncube (381 referals)
google.com : crack ioncube (346 referals)
google.com : php code encryption (266 referals)
google.com : april (235 referals)
google.com : node/440 (230 referals)
google.com : ioncube decode (229 referals)
google.com : eval(gzinflate(base64_decode (210 referals)
google.com : december (205 referals)
google.com : funny php code (193 referals)
phparch.com : php | architect - The PHP Magazine for PHP Professionals (156 referals)
www.phpdeveloper.org : PHPDeveloper.org: Alan Knowles' Blog: Recovering encoded php files (149 referals)
google.com : encrypt php code (133 referals)
google.com : eval(gzinflate(base64_decode( (118 referals)
www.planet-php.net : Planet PHP (115 referals)
google.com : gzinflate(base64_decode (114 referals)
Follow us
-
- Some thoughts on the language server and its usefulness in the roobuilder
- Roo Builder for Gtk4 moving forward
- Clustered Web Applications - Mysql and File replication
- GitLive - Branching - Merging
- PDO_DataObject Released
- PDO_DataObject is under way
- Mass email Marketing and anti-spam - some of the how-to..
- Hydra - Recruitment done right
Blog Latest
-
Twitter - @Roojs