未知 PHP 混淆技术

Unknown PHP obfuscation technique

我遇到了一段使用各种混淆技术的代码,主要是出于好奇,我一直在尝试理解它使用的技术。

我已经对它做了一些工作,但我现在还不能完全理解它在做什么:

public $x1528 = null;
public $x153c = null;

function __construct()
{
    $this->x1528 = new \StdClass();
    $this->x153c = new \StdClass();
    $this->x1528->x21a9 = "getSingleton";
    $this->x1528->x1569 = "x1565";
    $this->x1528->x1e45 = "x1e40";
    $this->x153c->x3b3b = "x3b38";
    $this->x1528->x16c3 = "x16c2";
    $this->x1528->x1bec = "x1be8";
    $this->x1528->x245a = "x2455";
    $this->x1528->x1b14 = "x10d7";
    $this->x153c->x36d4 = "x36d2";
    $this->x1528->x24d6 = "getSingleton";
    $this->x1528->x1876 = "xf0f";
    $this->x1528->x2901 = "x2900";
    $this->x1528->x1877 = "x1876";
    $this->x153c->x335b = "x3356";
    $this->x1528->x2836 = "x2833";
    $this->x1528->x2119 = "x2115";
    $this->x1528->x18bb = "xf3d";
    $this->x153c->x349e = "x349a";
    $this->x1528->x2383 = "getData";
    $this->x1528->x17b1 = "x5f2";
    $this->x153c->x2d06 = "xf41";
    $this->x1528->x1f35 = "x1f30";
    $this->x1528->x1a93 = "x1138";
    $this->x1528->x1d79 = "x1d76";
    $this->x1528->x1d7c = "x1d79";
    $this->x153c->x3248 = "_isAllowed";
    ...
    [it keeps going for a while...]

所以它声明了空变量,生成空对象,然后存储字符串和对其他变量的引用,但是... 例如,

$this->x1528->x21a9 = "getSingleton";

什么是 x21a9?任何地方都没有提到这个,我认为 x1528 变量是空的?另外,这是在没有 $ 的情况下引用 $x1528 的方法吗,因为我以前从未见过这种语法。

这是使用了我不知道的 PHP 技术,这让我很好奇。有帮助吗?

如果没有看到完整的代码,很难说清楚。但基本上这只是 "gibberish" 使其难以阅读,但基本的 PHP 仍然存在。

What is x21a9 ?

这只是在 $x1528 class 上随机设置的 属性。喜欢:

$dummyClass = new StdClass(); // Same as $this->x1528 = new \StdClass();
$dummyClass->foo = "bar"; // Same as $this->x1528->x21a9 = "getSingleton";

现在,echo $dummyClass->foo 会 return bar。它只是用一个值设置一个 属性,但是用 "cryptic" 个名字。

I thought the x1528 variable was empty ?

它在 class 的开头是空的,但随后在构造函数中,它立即被设置为 StdClass:

的实例
$this->x1528 = new \StdClass();

Also, is this a way of referencing the $x1528 without the $, because i've never seen this syntax before.

这是对象的基本语法。对象本身前面有一个$,但属性没有。