Skip to content

Instantly share code, notes, and snippets.

@caramelchocolate
Last active May 26, 2020 05:49
Show Gist options
  • Save caramelchocolate/68090b101a8e5b419e3b5a68f8227f95 to your computer and use it in GitHub Desktop.
Save caramelchocolate/68090b101a8e5b419e3b5a68f8227f95 to your computer and use it in GitHub Desktop.
<?php
# shell
# $ printf '\xF0\x9D\x95\x92'
# $ printf "𝕒"| hexdump
# f09d9592 𝕀
$start = 4036859264;
$end = 4036859281;
for ($i=$start; $i<$end; $i++) {
$hex = escape(dechex($i));
echo dechex($i) . ' ' . shell_exec("printf '${hex}'") . PHP_EOL;
}
# f09d9592 𝕒
$start = 4036859282;
$end = 4036859308;
for ($i=$start; $i<$end; $i++) {
$hex = escape(dechex($i));
echo dechex($i) . ' ' . shell_exec("printf '${hex}'") . PHP_EOL;
}
# f09d91a8 𝑨
$start = 4036858280;
$end = $start + 26;
for ($i=$start; $i<$end; $i++) {
$hex = escape(dechex($i));
echo dechex($i) . ' ' . shell_exec("printf '${hex}'") . PHP_EOL;
}
# f09d9282 𝒂
$start = 4036858498;
$end = $start + 26;
for ($i=$start; $i<$end; $i++) {
$hex = escape(dechex($i));
echo dechex($i) . ' ' . shell_exec("printf '${hex}'") . PHP_EOL;
}
# f09d9996 𝙖
$start = 4036860310;
$end = $start + 26;
for ($i=$start; $i<$end; $i++) {
$hex = escape(dechex($i));
echo dechex($i) . ' ' . shell_exec("printf '${hex}'") . PHP_EOL;
}
# f09d9794 𝗔
$start = 4036859796;
$end = $start + 26;
for ($i=$start; $i<$end; $i++) {
$hex = escape(dechex($i));
echo dechex($i) . ' ' . shell_exec("printf '${hex}'") . PHP_EOL;
}
# f09d9a8a 𝚊
$start = 4036860554;
$end = $start + 26;
for ($i=$start; $i<$end; $i++) {
$hex = escape(dechex($i));
echo dechex($i) . ' ' . shell_exec("printf '${hex}'") . PHP_EOL;
}
# f09d99b0 𝙰
$start = 4036860336;
$end = $start + 26;
for ($i=$start; $i<$end; $i++) {
$hex = escape(dechex($i));
echo dechex($i) . ' ' . shell_exec("printf '${hex}'") . PHP_EOL;
}
function escape ($hex) {
$max = mb_strlen($hex);
$output = '';
for ($i=0; $i<$max; $i+=2) {
$output .= '\x' . mb_substr($hex, $i, 2);
}
return $output;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment