欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

flashfxp解密

程序员文章站 2022-11-28 08:28:18
amxku's blog amxku PS:一个是7j写的,一个是国外的,相比之下,国外的那个东,速度要快一些,7J可能该郁闷了。呵呵,学习学习。 function flashfxp($data) { $pass=sub... 08-10-08...
amxku's blog amxku ps:一个是7j写的,一个是国外的,相比之下,国外的那个东,速度要快一些,7j可能该郁闷了。呵呵,学习学习。 function flashfxp($data)
{
$pass=substr($data, 2);
$flashfxp_key = array(y,0,a,0,3,0,6,0,z,0,a,0,4,0,8,0,d,0,e,0,h,0,f,0,r,0,v,0,g,0,h,0,g,0,r,0,g,0,5,0,7,0,h,0,5,0,u,0,l,0,d,0,v,0,3);
for ($i=0; $i < strlen($data) - 2; $i =2)
{
$run = (hexdec(substr($pass, $i, 2)) ^ hexdec(dechex(ord($flashfxp_key[$i])))) - hexdec(substr($data, $i, 2));
if ($run < 0)
$run=$run 255;
$num.=chr($run);
}
return $num;
}
国外的一个 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;
}