这个PHP做了什么?是编码器/解码器吗? [英] What does this PHP do? Is it an encoder/decoder?

查看:381
本文介绍了这个PHP做了什么?是编码器/解码器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我根本不知道PHP;这更是一个好奇的问题。



下面的PHP函数在文本文件中有几千个字符的文本,例如:

  xnEFstUhSNWGSx5zTq4X / AUW / rtism + klrBETWg0xE1uwb49rnRxrgrgY5EEp3Y0uvTcvLqhUFOP 
4n7LDLQpQ9UACTyuUjGBKmUScQCYLCP08u06t0K3nWTNiM7Q6bQMk / iZBE + UK1ywbVC1Lzr9OOEK

这个php函数是否将随机看的文本编码成php?编辑:客户说,他拥有完全的所有权和权利,由某人开发的代码其他。如何解码?是否需要密码?

 <?php // 003ac 
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 /'。 $ __号法律公告;
$ __ 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($ __这里,2));
}
$ __ rd = str_repeat('/ ..',substr_count($ __ id,'/'))。 $ __这里。 /;
$ __ i = strlen($ __ rd);
while($ __ i--){
if($ __ rd [$ __ i] =='/'){
$ __ lp = substr($ __ rd,0,$ __ i) $ __号法律公告;
if(file_exists($ __ oid。$ __ lp)){
$ __ ln = $ __ lp;
break;
}
}
}
@dl($ __ ln);
} else {
die('The file'。__FILE__。was corrupted.\\\
);
}
if(function_exists('_ il_exec')){
return _il_exec();
}
echo('Site error:the file< b>'。__FILE__。'< / b>要求ionCube
PHP Loader'。basename($ __ ln)由站点管理员安装。
exit(199);
?>


解决方案

它几乎是ioncube编码的PHP,或者混淆如果你喜欢。 Ioncube是一个非免费的模糊字节码执行引擎, ioncube加载器是处理混淆代码的库。



值得一提的是,'deobfuscator'是一个免费的图书馆,它载入我见过的大多数PHP安装。


I don't know PHP at all; this is more of a question of curiosity.

Following the PHP function below in the text file are a few thousand characters of text, such as:

xnEFstUhSNWGSx5zTq4X/AUw/rtism+klrBETWg0xE1uwb49rnRxrgrgY5EEp3Y0uvTcvLqhUFOP
4n7LDLQpQ9UACTyuUjGBKmUScQCYLCP08u06t0K3nWTNiM7Q6bQMk/iZBE+UK1ywbVC1Lzr9OOEK

Does this php function encode the random-looking text into php? Can the encryption scheme be figured out from this?

EDIT: The client says he has full ownership and rights to the code, developed by someone else. How would it be decoded? Does it require a password?

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

解决方案

It's practically ioncube-encoded PHP, or obfuscated if you like. Ioncube is a non-free obfuscated-bytecode execution engine and the ioncube loader is the library which handles the obfuscated code.

Worth to mention that the 'deobfuscator' is a free library, and it's loaded in most of the PHP installations I've seen.

这篇关于这个PHP做了什么?是编码器/解码器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆