检查 IonCube Loader 是否已安装的最佳方法

发布于 2024-09-14 13:32:47 字数 215 浏览 5 评论 0原文

我正在使用以下代码:

<?php
if(extension_loaded("IonCube Loader")) {     
  // Yes
}
else {
  // No
}
?>

我只是担心这无法在启用了 IonCube 的所有服务器上运行。这看起来很标准,但我以前从未需要检查过。这是最好的检查方法,还是我应该使用更好的方法?

I'm using the following code:

<?php
if(extension_loaded("IonCube Loader")) {     
  // Yes
}
else {
  // No
}
?>

I'm just concerned that this won't work across every server with IonCube enabled. It seems pretty standard, but I've never needed to check before. Is this the best way to check, or is there a better method I should be using?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

肤浅与狂妄 2024-09-21 13:32:47

如果未安装扩展程序,这将返回 false,据我所知,这是检查扩展程序是否可用的正确方法。

另一种选择是使用 get_loaded_extensions()。这将返回一个包含可用扩展名的数组。您可以检查该数组是否包含您想要的扩展名。

If the extension is not installed this will return you false, so as far as I know it is the correct way to check if an extension is available to use.

Another option is to use get_loaded_extensions(). This returns you an array with available extension names. You could check if this arrays contains your desired extension.

不疑不惑不回忆 2024-09-21 13:32:47

实际上我使用 SSH 来做大部分事情,包括文件复制。
当我需要检查 ionCube 加载程序时,对我来说更简单的方法就是 php -m

Zend 模块按照字母顺序列在底部。

我的输出(最后两行):
[Zend 模块]
ionCube PHP 加载器

对于其他选项,我使用 php -m | grep -v grep | grep -v grep 模块名称。
如果已加载则列出,否则将显示为空。 (除非您忘记了 grep -v grep 管道)。

Actually i use SSH for the most of the things, including file copy.
When i need to check for ionCube loader the easier way for me it's just php -m.

Zend modules are listed on the bottom, due to the alphabetical order.

My output (last 2 lines):
[Zend Modules]
the ionCube PHP Loader
.

For other options i used php -m | grep -v grep | grep MODULENAME.
If it's loaded is listed, otherwise you will get empty. (except if you forgot the grep -v grep pipe).

凡间太子 2024-09-21 13:32:47

这里是使用最新编码器 v9.0(PHP 5.6/7.0) 加密的 PHP 代码,如果 ionCube 加载程序正在工作,您应该看到文本“工作”,如果您看到空白页检查 php 日志:

<?php //0046b
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@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;}}}if(function_exists('dl')){@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 website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);

?>
HR+cPx6tTyKRWKphuWtYvXZumJL99w6eqPcw8RguzcdITTB7WMCLNusEXyi1ot1iTgoc8y+lkgal
weKJYPcyEXz2sBTUIeIHQN7vfrMG/Ys05+GSnrFlOfwMdT2vSUzgGklS7q+TPV6jMAtLBIdSi/iY
vfUB+Kooide9x8xN1lkZ3GKNJHS0RXQXHEtXPJ6BGuBw34zozLdp1vDRasmOCERhww6Ic2D8gpFD
gUiOhgsx6jvgIfXU6nWArCcZDyYjA+owXjguuiL+VJFurIhudMJprcXoQK5mv7JzzWN1gPskCSld
IjjPQuDbgsG8swBRL/l22DW0/CMxuYzl1jfhxc6bbrShp5JHB/9A6GXyusbLWdQjsOIIZOdIvaXq
O4t8BAwatZ4aenKJ3cXFt+Ns9ElRZN8l6M/iBG83OcbzsDjxKsPtdcYzumohoHjKML0dAWw9cS87
S+IZaxiWYURWvJbGMNH+plFCa6YKAI9ghmH3zT9HwWAOMcBtffeMr8CTTbrdSido8V+az8ZkMS6U
jQ5C9rCR8+oIxaKNxmv53eyIpxOx+XTr4Thh4grecMeLpOOm1U72ryXi0odClC0Ab3uGpu/lzNrj
oEg7XrSVOn7hS+VJ9khwj3s1zg1OVyrS2TTrvTIsw6h1xbKCitG9rRwPp/fv31voi7MC3K4=

这里是使用旧编码器 8.3 编码的 PHP 代码( PHP 5.6 及以下版本):

<?php //0046b
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@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;}}}if(function_exists('dl')){@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 website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);

?>
HR+cPp7q/tHOKq74dpvDQdk0enKwrkMD5yeF5eIiq+jd6h+ygyi99Yw9v+skX6plOCkD0S6vxDVT
g0nNVh2ujlRTSIiRAeEKpFhEG5BUvsr+EDaYN5HxECz/I9hYPAwp8hOqYfRctH5qT/1rYIX59wku
VRQDHVPzAMbv4kcSC/d/76RrKED24mpGOTteHWb4gyV5wkMY3lauJ2Kt525x+66BeXwGFubP+Ty4
bTvQZAlcRrNw7vkhaGIx6DWxyYWED5EFPWI3/GZ0xzTbpL83DUVUtS/ediGlJTj5NyBlLtEcuRLv
XE5a6kiJU6ZLCcSmSDdBluUKyuUqqIwddbhBpeNik8bzS3aT6kOxhwlOIQZeunaIaLdBDlUGcQ6i
1Op7pe9lurj06xerCWDRwcQjFjpj3ZVCR1z9NuCRkV+YCYWS

这里使用过时的编码器 7.0(PHP 5.6 及以下版本)编码的 PHP 代码:

<?php //0046b
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@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;}}}if(function_exists('dl')){@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 website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);

?>
HR+cPztBoaaSBCzkpN9VQlx61diBTKY3K9Mo6QkiHctnYMVjt+wt5LKPQiXrdL2L4kPfUYzmMESC
lcAxEsG3poSelwD+kdd08ZYEwxLBpp7ygESUJ3bafOEpLpdkuPTvrz8X69Zu7qlvz818LBJQe/Tz
mxcC8cJvxWBWfyVldqFIfwAdP7FElroV7giVwaoFWplm+3Ut5FutMAWRd7f95Gb9ghPgLSMS7crq
4Qx1E3bK1BTXgDrKZ0RfRbd2gSLZlA97dGwTbM8ccs9bbie3LGVEtZlGR/J9Bz142go08cr/Taym
xfs4+ITF7iqEk8gWdywHV1tYKJvc26w4bpIW51IcXdcd0QDIdhx4PfTVmMxyVVmqPuVv8L23N6EI
sTAuCNc5o8LjRzW2Yp4ctMJVPKkjWmg4HKs95xZABDbJ

Here the PHP code encrypted with latest encoder v9.0(PHP 5.6/7.0), if ionCube loader is working you should see text "working", if you see blank page check for php logs:

<?php //0046b
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@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;}}}if(function_exists('dl')){@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 website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);

?>
HR+cPx6tTyKRWKphuWtYvXZumJL99w6eqPcw8RguzcdITTB7WMCLNusEXyi1ot1iTgoc8y+lkgal
weKJYPcyEXz2sBTUIeIHQN7vfrMG/Ys05+GSnrFlOfwMdT2vSUzgGklS7q+TPV6jMAtLBIdSi/iY
vfUB+Kooide9x8xN1lkZ3GKNJHS0RXQXHEtXPJ6BGuBw34zozLdp1vDRasmOCERhww6Ic2D8gpFD
gUiOhgsx6jvgIfXU6nWArCcZDyYjA+owXjguuiL+VJFurIhudMJprcXoQK5mv7JzzWN1gPskCSld
IjjPQuDbgsG8swBRL/l22DW0/CMxuYzl1jfhxc6bbrShp5JHB/9A6GXyusbLWdQjsOIIZOdIvaXq
O4t8BAwatZ4aenKJ3cXFt+Ns9ElRZN8l6M/iBG83OcbzsDjxKsPtdcYzumohoHjKML0dAWw9cS87
S+IZaxiWYURWvJbGMNH+plFCa6YKAI9ghmH3zT9HwWAOMcBtffeMr8CTTbrdSido8V+az8ZkMS6U
jQ5C9rCR8+oIxaKNxmv53eyIpxOx+XTr4Thh4grecMeLpOOm1U72ryXi0odClC0Ab3uGpu/lzNrj
oEg7XrSVOn7hS+VJ9khwj3s1zg1OVyrS2TTrvTIsw6h1xbKCitG9rRwPp/fv31voi7MC3K4=

Here PHP code encoded with legacy encoder 8.3(PHP 5.6 and below):

<?php //0046b
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@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;}}}if(function_exists('dl')){@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 website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);

?>
HR+cPp7q/tHOKq74dpvDQdk0enKwrkMD5yeF5eIiq+jd6h+ygyi99Yw9v+skX6plOCkD0S6vxDVT
g0nNVh2ujlRTSIiRAeEKpFhEG5BUvsr+EDaYN5HxECz/I9hYPAwp8hOqYfRctH5qT/1rYIX59wku
VRQDHVPzAMbv4kcSC/d/76RrKED24mpGOTteHWb4gyV5wkMY3lauJ2Kt525x+66BeXwGFubP+Ty4
bTvQZAlcRrNw7vkhaGIx6DWxyYWED5EFPWI3/GZ0xzTbpL83DUVUtS/ediGlJTj5NyBlLtEcuRLv
XE5a6kiJU6ZLCcSmSDdBluUKyuUqqIwddbhBpeNik8bzS3aT6kOxhwlOIQZeunaIaLdBDlUGcQ6i
1Op7pe9lurj06xerCWDRwcQjFjpj3ZVCR1z9NuCRkV+YCYWS

Here PHP code encoded with obsoleted encoder 7.0(PHP 5.6 and below):

<?php //0046b
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@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;}}}if(function_exists('dl')){@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 website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);

?>
HR+cPztBoaaSBCzkpN9VQlx61diBTKY3K9Mo6QkiHctnYMVjt+wt5LKPQiXrdL2L4kPfUYzmMESC
lcAxEsG3poSelwD+kdd08ZYEwxLBpp7ygESUJ3bafOEpLpdkuPTvrz8X69Zu7qlvz818LBJQe/Tz
mxcC8cJvxWBWfyVldqFIfwAdP7FElroV7giVwaoFWplm+3Ut5FutMAWRd7f95Gb9ghPgLSMS7crq
4Qx1E3bK1BTXgDrKZ0RfRbd2gSLZlA97dGwTbM8ccs9bbie3LGVEtZlGR/J9Bz142go08cr/Taym
xfs4+ITF7iqEk8gWdywHV1tYKJvc26w4bpIW51IcXdcd0QDIdhx4PfTVmMxyVVmqPuVv8L23N6EI
sTAuCNc5o8LjRzW2Yp4ctMJVPKkjWmg4HKs95xZABDbJ
饭团 2024-09-21 13:32:47

另一种方法是

<?php
phpinfo()
?>

查看“附加模块”标题,您应该能够看到

ionCube Loader

another method is

<?php
phpinfo()
?>

and look under Additional Module heading, you should be able to see

ionCube Loader

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文