【问题标题】:Pattern for detecting if a specific file is encoded by ioncube用于检测特定文件是否由 ioncube 编码的模式
【发布时间】:2011-11-27 11:15:05
【问题描述】:

我想通过脚本识别离子立方编码的 PHP 文件。我在每个 ioncube 编码的 PHP 文件中都看到了一些常见的字符串:

<?php //003ab
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);
?>

我想知道这个字符串是否是所有 ioncube 编码文件的典型字符串,无论 ioncube 版本或在编码操作发生时正在运行的平台 ioncube。

【问题讨论】:

    标签: php ioncube


    【解决方案1】:

    在结束 php 标记 ?&gt; Ioncube 文件之后始终以:0a 03 c1 2b 字节开头

    更新:

    然后你需要加载 ioncube 扩展,然后:

    "5.4.1 混合 ioncube_read_file(字符串路径 [,bool &was_encrypted [,字符串密码] ] ]) ... 如果成功读取文件,则内容将作为二进制安全字符串返回。 "

    IONCUBE 手册: http://www.ioncube.com/USER-GUIDE.pdf

    【讨论】:

    • 没有。我有一个文件以 34 2b 6f 56 开头,就在第 4 行(在结尾 ?&gt; 之后)
    猜你喜欢
    • 1970-01-01
    • 2021-12-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-05
    • 2021-06-04
    • 2012-04-26
    • 1970-01-01
    相关资源
    最近更新 更多