破解Discuz! 4.0.0 20051001的方法

演示:
http://newbbs.dothome.co.kr/vip/index.php

打开

include\validate.class.php

替换

程序代码

 

  1<?php
  2class licensestuff
  3{
  4var $data = '';
  5var $key = array ();
  6var $env = array ();
  7function readfile ()
  8{
  9if ($fp = fopen ((DISCUZ_ROOT.'./discuz_license.php'), 'r'))
 10{
 11$this->data = fread ($fp, 9999);
 12fclose ($fp);
 13}
 14
 15}
 16
 17function initialize ()
 18{
 19$this->readfile ();
 20if ($this->data)
 21{
 22foreach (explode ('
 23', $this->data) as $string)
 24{
 25if (strpos ($string, ' = '))
 26{
 27eval (preg_replace (((((((((((((''.'/^(').'[').'a-z0-9').'\\-').']').'+)').'\\s').'\\=').'\\s').'(.+?)').'$').'/i'), '$this->key[\'\\1\'] = \'\\2\';', trim (str_replace ('\'''\\\'', $string))));
 28}
 29else
 30{
 31if (preg_match ('/\\<\\?\'.+\'\\?\\>/', $string))
 32{
 33$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@##');
 34}
 35}
 36}
 37
 38$this->getenvinfo ();
 39return 1;
 40}
 41/* else
 42{
 43if (((strtoupper (substr (PHP_OS, 0, 3)) == 'WIN') AND in_array ($GLOBALS['_SERVER']['HTTP_HOST'], array ('localhost', '127.0.0.1'))))
 44{
 45return 2;
 46}
 47else
 48{
 49return 0;
 50}
 51}*/
 52
 53}
 54
 55function checkinfo ()
 56{
 57if ((substr ($this->key['Validation-code'], 16, 8== substr (md5 (preg_replace (((((((((((((''.'/^(.+?)').'\\s').'*').'\\<').'\\?').'\\\'').'.+').'\\\'').'\\?').'\\>').'$').'/s'), '\\1', $this->data)), 0, 8)))
 58{
 59return TRUE;
 60}
 61else
 62{
 63return TRUE;
 64}
 65
 66}
 67
 68function checkdate ()
 69{
 70if ((!$this->key['License-expires'] OR (time () < strtotime ($this->key['License-expires']))))
 71{
 72return TRUE;
 73}
 74else
 75{
 76return TRUE;
 77}
 78
 79}
 80
 81function checkkey ()
 82{
 83if ((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)))
 84{
 85return TRUE;
 86}
 87else
 88{
 89return TRUE;
 90}
 91
 92}
 93
 94function checkhostpath ()
 95{
 96if ((((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))))
 97{
 98return TRUE;
 99}
100else
101{
102return TRUE;
103}
104
105}
106
107function getenvinfo ()
108{
109global $_SERVER;
110global $_POST;
111global $_ENV;
112$env['time'= gmdate ('d-M-Y', time ());
113$env['os'= PHP_OS;
114$env['ip'= getenv ('SERVER_ADDR');
115$env['sapi'= php_sapi_name ();
116$env['host'= (getenv ('HTTP_HOST'? getenv ('HTTP_HOST': $_SERVER['HTTP_HOST']);
117// $env['path'] = dirname (('validate.class.php.LkuQHr' ? dirname ('validate.class.php.LkuQHr') : getenv ('SCRIPT_FILENAME')));//********
118$env['cpu'= (($_ENV['PROCESSOR_IDENTIFIER'].'/').$_ENV['PROCESSOR_REVISION']);
119$env['name'= $_ENV['COMPUTERNAME'];
120$this->env = $env;
121}
122
123function decrypt ($txt, $key, $owner = '')
124{
125$txt = $this->keyED (base64_decode ($txt), (($owner == '##@Crossday Studio@##'? $key : ''));
126$tmp = '';
127for ($i = 0; ($i < strlen ($txt)); $i++)
128{
129$md5 = $txt[$i];
130$i++;
131($tmp .= ($txt[$i^ $md5));
132}
133
134return $tmp;
135}
136
137function keyed ($txt, $encrypt_key)
138{
139$encrypt_key = md5 ($encrypt_key);
140$ctr = 0;
141$tmp = '';
142for ($i = 0; ($i < strlen ($txt)); $i++)
143{
144if (($ctr == strlen ($encrypt_key)))
145{
146$ctr = 0;
147}
148
149($tmp .= ($txt[$i^ $encrypt_key[$ctr]));
150$ctr++;
151}
152
153return $tmp;
154}
155
156function validate ()
157{
158$init = $this->initialize ();
159if ((($init == 2) OR ((((($init == 1) AND $this->checkinfo ()) AND $this->checkdate ()) AND $this->checkkey ()) AND $this->checkhostpath ())))
160{
161if (($init == 2))
162{
163define ('DISCUZ_LICENSE_KEY', md5 ((base64_decode ('ISgqISEpQCZfRGlzY3V6IV9pc19SdW5uaW5nX3VuZGVyX0xvY2FsaG9zdA').md5 (((('#19811027_'.'DZK_').'WROTE_Discuz!_').substr (time (), 0, (0 - 2)))))));
164}
165else
166{
167define ('DISCUZ_LICENSE_KEY', md5 ((base64_decode ('ISgqISEpQCZfRGlzY3V6IV9XSUxMX1dJTl9USEVfRlVUVVJFX0ZST01fTk9XX09O').md5 (((('#19811027_'.'DZK_').'WROTE_Discuz!_').substr (time (), 0, (0 - 2)))))));
168}
169}
170else
171{
172/* echo '<html>
173<head>
174<title>Invalid License File</title>
175</head>
176<body bgcolor="#FFFFFF">
177<table cellpadding="0" cellspacing="0" border="0" width="600" align="center" height="85%">
178<tr align="center" valign="middle">
179<td>
180<table cellpadding="10" cellspacing="0" border="0" width="80%" align="center" style="font-family: Verdana, Tahoma; color: #666666; font-size: 12px">
181<tr>
182<td valign="m';
183echo 'iddle" bgcolor="#EBEBEB">
184<br><b style="font-size: 20px">Your License was Invalid</b>
185<br><br>License expiring, shifting to a new server, changing server IP, hardware, OS, PHP SAPI module, or, changing both host name and absolute directory on your disk, may invalidate your license. If you have trouble in activation, please visit <a href="http://www.discuz.com/license/" target="_blank">';
186echo 'http://www.discuz.com/license/</a> for more information.
187<br><br>您的密匙不存在、超过有效期、更换新的服务器空间、更改 IP 地址、硬件、操作系统、PHP 安装模&';
188echo '#x5F0F;,或同时改变绝对路径或访问域名,都可能导致密匙失效。请访问 <a href="http://www.discuz.com/license/" target="_blank">http://www.discuz.com/license/</a> 重新生成密匙。
189<br><b';
190echo 'r>
191</td>
192</tr>
193</table>
194</td>
195</tr>
196</table>
197</body>
198</html>
199';
200exit ();
201return TRUE;*/
202}
203
204}
205}
206
207if (!defined ('IN_DISCUZ'))
208{
209exit ('Access Denied');
210}
211
212$license = new licensestuff ();
213$license->validate ();
214unset ($license);
215?>

再在根目录新建个 discuz_license.php

内容为
程序代码

 

1# !ATTENTION! PLEASE DO NOT OPEN FOR EDITING
2# ANY MODIFICATION WILL INVALIDATE THIS LICENSE
3
4Product-name = Discuz! Board Retail
5License-issued = 16-Jul-2005
6
7Registered-to = Tkz
8Registered-URL = http://127.0.0.1/
9

 

 posted on 2005-11-21 11:45  月の祭司  阅读(1227)  评论(0编辑  收藏  举报