Hi, got a reall head scratcher. Im trying to make a PHP obfuscator ( http://www.actwebdesigns.co.uk/web-design-blog/actobfuscator-free-open-source-php-obfuscator/ )
I've hit a little problem tho. I cant find a guaranteed way of finding a user defined constant.
some of my the token_name()'s return as T_STRING and others as T_CONSTANT_ENCAPSED_STRING, which with my code as it is does not change all constantss as shown below;
<?php
//ACTObfuscator - Created by ACT Web Designs
//http://www.actwebdesigns.co.uk
?>
<?php
@define("V566B1DF8B3B32D1", false); if( V566B1DF8B3B32D1 ) { define('DB_USERNAME', "wefghgfh"); define('DB_PASSWORD', "mulfghgfh"); define('DB_SERVER', "gfhgst"); define("V2FC1E4F930A251A", "webfghgfh"); define("VDA9E0DAA31346F8", "<+ site_name +>"); define("V4424E58002D8BE7", "actvbiz.co.uk"); define("VBE72B58F4FE19A6", '<img src="./?0000=jpg&0001=0001&0002=pic" width="277" style="position:relative; z-index:5; background:url(./?0000=png&0001=shade&0002=pic) bottom repeat-x;" height="167" alt="ACTvBiz Logo" />' ); define("V7052A961BF53D55", "http://www.actvbiz.co.uk"); define("V692CD2C3D40F692", "[email protected]"); define("VDC5565EDE9405AA", "nnn_accounts"); }else{ header("location: http://www.actvbiz.co.uk"); exit; } ?>
(ignore the <+ foobar +> as thats for something else)
any help is much appreciated.