Permalink
Switch branches/tags
Nothing to show
Find file Copy path
47d7d30 Mar 27, 2014
1 contributor

Users who have contributed to this file

26 lines (23 sloc) 541 Bytes
<?php
/*
纯真数据库自动更新原理实现
www.shuax.com 2014.03.27
*/
$copywrite = file_get_contents("http://update.cz88.net/ip/copywrite.rar");
$qqwry = file_get_contents("http://update.cz88.net/ip/qqwry.rar");
$key = unpack("V6", $copywrite)[6];
for($i=0; $i<0x200; $i++)
{
$key *= 0x805;
$key ++;
$key = $key & 0xFF;
$qqwry[$i] = chr( ord($qqwry[$i]) ^ $key );
}
$qqwry = gzuncompress($qqwry);
$fp = fopen("qqwry.dat", "wb");
if($fp)
{
fwrite($fp, $qqwry);
fclose($fp);
}
?>