AntSwordProject / Ant_php_extension
PHP 扩展, 用于 PHP-FPM、FastCGI、LD_PRELOAD等模式下突破 disabled_functions
Stars: ✭ 85
Programming Languages
c
50402 projects - #5 most used programming language
Labels
Projects that are alternatives of or similar to Ant php extension
Zephir
Zephir is a compiled high level language aimed to the creation of C-extensions for PHP.
Stars: ✭ 3,086 (+3530.59%)
Mutual labels: php-extension
Pinyin Php
`pinyin-php` is a php extension which could translate Chinese character into Chinese PinYin.
Stars: ✭ 26 (-69.41%)
Mutual labels: php-extension
Phptdlib
PHP Extension for tdlib/td written with PHP-CPP
Stars: ✭ 59 (-30.59%)
Mutual labels: php-extension
Gutenberg Parser Rs
An experimental Rust parser for WordPress Gutenberg post format
Stars: ✭ 76 (-10.59%)
Mutual labels: php-extension
Php Spx
A simple & straight-to-the-point PHP profiling extension with its built-in web UI
Stars: ✭ 972 (+1043.53%)
Mutual labels: php-extension
Graphql Parser Php
A PHP extension wrapping the libgraphqlparser library for parsing GraphQL.
Stars: ✭ 29 (-65.88%)
Mutual labels: php-extension
Skyapm Php Sdk
The PHP instrument agent for Apache SkyWalking
Stars: ✭ 292 (+243.53%)
Mutual labels: php-extension
Seaslog
An effective,fast,stable log extension for PHP.http://pecl.php.net/package/SeasLog http://php.net/SeasLog
Stars: ✭ 1,136 (+1236.47%)
Mutual labels: php-extension
Study
手把手教你写PHP协程扩展(teach you to write php coroutine extension by hand)
Stars: ✭ 285 (+235.29%)
Mutual labels: php-extension
Phpython
PHPython: An extension to eval python3 codes in PHP
Stars: ✭ 13 (-84.71%)
Mutual labels: php-extension
Ant PHP Extension
PHP 扩展, 用于 PHP-FPM、FastCGI 模式下突破 disabled_functions
。
原理
加载该扩展后, 可使用函数 antsystem
执行命令(相当于 system
别名)
eg:
<?php antsystem('whoami'); ?>
php.ini 样例
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,exec,shell_exec,popen,proc_open,passthru,symlink,link,syslog,imap_open,ld,mail,system
编译
$ cd ant_php_extension/
$ phpize && ./configure && make
编译完成后当前目录下的 ant.so
则是需要的文件
安装到本机
$ cd ant_php_extension/
$ phpize && ./configure && make
$ make install
# 测试
$ php -d enable_dl=On ant.php
相关链接
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].