Question : Decode PHP file

hi

is it possible to decode ioncube encoded php file?

i bought the script and unfortunately its encoded. i want to make some changes to fit my needs.

readable code in the script is this

1:
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');@dl($__ln);if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the site administrator.');exit(199);



Answer : Decode PHP file

I ran it through a reformatter for you (See above). It only has a few dozen lines so figuring it out should not be that hard. For instance

if (file_exists($__oid.$__lp)) {

I'd be willing to bet that $__lp is a filename and $__oid is a pathname so doing a global replace with an editor would soon  start to make the code readable and undertsandable.

Similarly, $__i seems to be a simple index,  so and so forth.
Random Solutions  
 
programming4us programming4us