function decryptffxp($ciphertext)
{
$magic_buffer="yA36zA48dEhfrvghGRg57h5UlDv3";
$count =0;
$length =strlen($ciphertext);
while ($count < $length)
{
$cts.=chr(hexdec($ciphertext[$count] . $ciphertext[$count + 1]));
$count+=2;
}
$length =strlen($cts);
$count =0;
$mbcount=0;
while ($count + 1 < $length)
{
$foo = ord($cts[$count + 1]) ^ ord($magic_buffer[$mbcount]);
if ($foo - ord($cts[$count]) < 0)
{
$plaintext.=chr($foo - ord($cts[$count]) + 255);
}
else
{
$plaintext.=chr($foo - ord($cts[$count]));
}
$count++;
$mbcount++;
if ($mbcount == 28)
{
$mbcount=0;
}
}
return $plaintext;
}
{
$magic_buffer="yA36zA48dEhfrvghGRg57h5UlDv3";
$count =0;
$length =strlen($ciphertext);
while ($count < $length)
{
$cts.=chr(hexdec($ciphertext[$count] . $ciphertext[$count + 1]));
$count+=2;
}
$length =strlen($cts);
$count =0;
$mbcount=0;
while ($count + 1 < $length)
{
$foo = ord($cts[$count + 1]) ^ ord($magic_buffer[$mbcount]);
if ($foo - ord($cts[$count]) < 0)
{
$plaintext.=chr($foo - ord($cts[$count]) + 255);
}
else
{
$plaintext.=chr($foo - ord($cts[$count]));
}
$count++;
$mbcount++;
if ($mbcount == 28)
{
$mbcount=0;
}
}
return $plaintext;
}
本文介绍了一个用于解密特定格式密文的PHP函数。该函数通过解析十六进制密文并与魔法字符串进行异或运算来逐步还原原始明文。
1731

被折叠的 条评论
为什么被折叠?



