来自落伍兄弟TKZ
打开
include\validate.class.php
替换:
〈?php
class licensestuff
{
var $data = ’’;
var $key = array ();
var $env = array ();
function readfile ()
{
if ($fp = fopen ((DISCUZ_ROOT.’./discuz_license.php’), ’r’))
{
$this-〉data = fread ($fp, 9999);
fclose ($fp);
}
}
function initialize ()
{
$this-〉readfile ();
if ($this-〉data)
{
foreach (explode (’
’, $this-〉data) as $string)
{
if (strpos ($string, ’ = ’))
{
eval (preg_replace (((((((((((((’’.’/^(’).’[’).’a-z0-9’).’\\-’).’]’).’+)’).’\\s’).’\\=’).’\\s’).’(.+?)’).’$’).’/i’), ’$this-〉key[\’\\1\’] = \’\\2\’;’, trim (str_replace (’\’’, ’\\\’’, $string))));
}
else
{
if (preg_match (’/\\〈\\?\’.+\’\\?\\〉/’, $string))
{
$this-〉key[’Validation-code’] = $this-〉decrypt (preg_replace (’/\\〈\\?\’(.+)\’\\?\\〉/’, ’\\1’, $string), ’I love my father, mother, my Grace, and my self, I am working hard’, ’##@Crossday Studio@##’);
}
}
}
$this-〉getenvinfo ();
return 1;
}
/* else
{
if (((strtoupper (substr (PHP_OS, 0, 3)) == ’WIN’) AND in_array ($GLOBALS[’_SERVER’][’HTTP_HOST’], array (’localhost’, ’127.0.0.1’))))
{
return 2;
}
else
{
return 0;
}
}*/
}
function checkinfo ()
{
if ((substr ($this-〉key[’Validation-code’], 16, 8) == substr (md5 (preg_replace (((((((((((((’’.’/^(.+?)’).’\\s’).’*’).’\\〈’).’\\?’).’\\\’’).’.+’).’\\\’’).’\\?’).’\\〉’).’$’).’/s’), ’\\1’, $this-〉data)), 0, 8)))
{
return TRUE;
}
else
{
return TRUE;
}
}
function checkdate ()
{
if ((!$this-〉key[’License-expires’] OR (time () 〈 strtotime ($this-〉key[’License-expires’]))))
{
return TRUE;
}
else
{
return TRUE;
}
}
function checkkey ()
{
if ((substr ($this-〉key[’Validation-code’], 8, 8) == substr (md5 ((((((((($this-〉env[’os’].’|’).$this-〉env[’ip’]).’|’).$this-〉env[’sapi’]).’|’).$this-〉env[’cpu’]).’|’).$this-〉env[’name’])), 0, 8)))
{
return TRUE;
}
else
{
return TRUE;
}
}
function checkhostpath ()
{
if ((((substr ($this-〉key[’Validation-code’], 24, 6) == ((dechex (ord (’d’)).dechex (ord (’z’))).dechex (ord (’k’)))) OR (substr ($this-〉key[’Validation-code’], 0, 8) == substr (md5 ($this-〉env[’host’]), 0, 8))) OR (substr ($this-〉key[’Validation-code’], 24, 8) == substr (md5 ($this-〉env[’path’]), 0, 8))))
{