note 59881 added to function.base64-encode
| From: | php at mmx dot e4ward dot com | Date: | Mon, 19 Dec 2005 07:19:44 +0000 |
| Subject: | note 59881 added to function.base64-encode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-100398@lists.php.net to get a copy of this message | ||
I dont understand why so many programmers use base64_encode to obfuscate their scripts. It can be
completely reversible in a matter of seconds.
Instead of using base64_encode to obfuscate, go out and buy Zend Encoder. If you are just cheap,
there are other free options like http://pobs.mywalhalla.net/ and http://www.phpcipher.com/
However, if you really want to use base64_encode to obfuscate your source code, you can try running
it multiple times. It wont be more secure but it will be more irritating.
<?
function base64_hide ($sourceCode) {
for ($k=0; $k <10; $k++) {
$sourceCode = "eval(base64_decode(" + base64_encode($sourceCode) + "));";
}
return $sourceCode;
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.base64-encode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59881
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59881&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59881&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59881&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59881&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59881&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59881&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59881&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59881&report=yes
Search -- http://master.php.net/manage/user-notes.php