cmaymard / php-code
提供对C++名称混淆的支持。
0.1.0
2020-03-29 12:30 UTC
Requires
- php: >=7.3
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: 8.5.*
This package is auto-updated.
Last update: 2024-09-29 06:14:19 UTC
README
PhpCode提供对C++名称混淆的支持。
安装
composer require cmaymard/php-code
示例
混淆C++名称(Itanium编码)
use PhpCode\Language\Cpp\Mangling\ItaniumMangler; use PhpCode\Language\Cpp\Specification\LanguageContextFactory; use PhpCode\Language\Cpp\Specification\Standard; $languageContextFactory = new LanguageContextFactory(); $languageContext = $languageContextFactory->create(Standard::CPP2017); $mangler = new ItaniumMangler($languageContext); // '_Z4mainv' \var_dump($mangler->mangleFunction('main()')); // '_Z4calcisjlfdi' \var_dump($mangler->mangleFunction('calc(int, short, unsigned, long, float, double, signed)')); // '_ZN9Framework7Logging6Logger3logEN3Log5ETypeEbcwz' \var_dump($mangler->mangleFunction('Framework::Logging::Logger::log(Log::EType, bool, char, wchar_t, ...)'));
更多示例,请阅读混淆C++名称文档。