{"id":31,"date":"2011-08-09T11:25:47","date_gmt":"2011-08-09T03:25:47","guid":{"rendered":"http:\/\/www.uut8.com\/?p=31"},"modified":"2011-08-09T11:25:47","modified_gmt":"2011-08-09T03:25:47","slug":"%e5%9c%a8%e4%b8%8a%e4%bc%a0%e6%96%87%e4%bb%b6%e4%b9%8b%e5%90%8e%e5%ae%89%e8%a3%85%e4%b9%8b%e5%89%8d%e6%a0%a1%e9%aa%8c%e6%96%87%e4%bb%b6%e7%9a%84%e5%b7%a5%e5%85%b7","status":"publish","type":"post","link":"https:\/\/www.uut8.com\/?p=31","title":{"rendered":"\u5728\u4e0a\u4f20\u6587\u4ef6\u4e4b\u540e\u5b89\u88c5\u4e4b\u524d\u6821\u9a8c\u6587\u4ef6\u7684\u5de5\u5177"},"content":{"rendered":"<pre class=\"brush:php\">&lt;?php\n\nif(!$discuzfiles = @file('.\/source\/admincp\/discuzfiles.md5')) {\n\techo \"source\\admincp\\discuzfiles.md5\u6587\u4ef6\u4e0d\u5b58\u5728\uff0c\u8bf7\u4e0a\u4f20\uff01\";\n}\n$md5data = array();\ncheckfiles('.\/', '', 0);\ncheckfiles('config\/', '', 1, 'config_global.php,config_ucenter.php');\ncheckfiles('data\/', '\\.xml', 0);\ncheckfiles('data\/avatar\/', '\\.htm', 0);\ncheckfiles('data\/cache\/', '\\.htm', 0);\ncheckfiles('data\/ipdata\/', '\\.htm|\\.dat', 0);\ncheckfiles('data\/template\/', '\\.htm', 0);\ncheckfiles('data\/threadcache\/', '\\.htm', 0);\ncheckfiles('template\/', '');\ncheckfiles('api\/', '');\ncheckfiles('source\/', '', 1, 'discuzfiles.md5,plugin');\ncheckfiles('static\/', '');\ncheckfiles('archiver\/', '');\ncheckfiles('uc_client\/', '\\.php|\\.htm', 0);\ncheckfiles('uc_client\/data\/', '\\.htm');\ncheckfiles('uc_client\/control\/', '\\.php|\\.htm');\ncheckfiles('uc_client\/model\/', '\\.php|\\.htm');\ncheckfiles('uc_client\/lib\/', '\\.php|\\.htm');\ncheckfiles('uc_server\/', '\\.php|\\.htm|\\.txt|\\.xml', 0);\ncheckfiles('uc_server\/data\/', '\\.htm');\ncheckfiles('uc_server\/api\/', '\\.php|\\.htm');\ncheckfiles('uc_server\/control\/', '\\.php|\\.htm|\\.md5');\ncheckfiles('uc_server\/model\/', '\\.php|\\.htm');\ncheckfiles('uc_server\/lib\/', '\\.php|\\.htm');\ncheckfiles('uc_server\/plugin\/', '\\.php|\\.htm|\\.xml');\ncheckfiles('uc_server\/upgrade\/', '\\.php');\ncheckfiles('uc_server\/images\/', '\\..+?');\ncheckfiles('uc_server\/js\/', '\\.js|\\.htm');\ncheckfiles('uc_server\/release\/', '\\.php');\ncheckfiles('uc_server\/view\/', '\\.php|\\.htm');\n\nforeach($discuzfiles as $line) {\n\t$file = trim(substr($line, 34));\n\t$md5datanew[$file] = substr($line, 0, 32);\n\tif($md5datanew[$file] != $md5data[$file]) {\n\t\t$modifylist[$file] = $md5data[$file];\n\t}\n\t$md5datanew[$file] = $md5data[$file];\n}\n\n$dellist = @array_diff_assoc($md5datanew, $md5data);\n$modifylist = array_diff_assoc($modifylist, $dellist);\n$num = count($dellist);\necho \"&lt;div style='float:left;'&gt;&lt;h2&gt;\u68c0\u67e5\u5b8c\u6bd5\uff0c\u7f3a\u5c11\".$num.\"\u4e2a\u6587\u4ef6\uff1a&lt;\/h2&gt;&lt;br \/&gt;\";\nforeach ($dellist as $names =&gt; $v) {\t\n\techo \"&lt;b&gt;\".$names.\"&lt;\/b&gt;&lt;br \/&gt;\";\n}\nif($names){\n\techo \"&lt;br \/&gt;&lt;br \/&gt;\u8bf7\u4e0a\u4f20\u4e0a\u8ff0\u6587\u4ef6\uff0c\u4ee5\u786e\u4fdd\u7ad9\u70b9\u6b63\u5e38\u8fd0\u884c\uff01&lt;br \/&gt;&lt;br \/&gt;&lt;br \/&gt;&lt;\/div&gt;\";\n}\necho \"&lt;div style='float:left;margin-left:50px;'&gt;&lt;h2&gt;\u4ee5\u4e0b\u6587\u4ef6\u53ef\u80fd\u6ca1\u6709\u4e0a\u4f20\u5b8c\u6574\uff01&lt;\/h2&gt;&lt;br \/&gt;\";\nforeach($modifylist as $lose =&gt; $vs){\n\techo \"&lt;b&gt;\".$lose.\"&lt;\/b&gt;&lt;br \/&gt;\";\n}\necho \"&lt;br \/&gt;&lt;br \/&gt;\u8bf7\u68c0\u67e5FTP\u5de5\u5177\u6216\u7f51\u7edc\u72b6\u51b5\u662f\u5426\u6b63\u5e38\uff0c\u7136\u540e\u91cd\u65b0\u4e0a\u4f20\u8fd9\u4e9b\u6587\u4ef6\u3002&lt;\/div&gt;\";\nfunction checkfiles($currentdir, $ext = '', $sub = 1, $skip = '') {\n\tglobal $md5data;\n\t$path = realpath('.\/');\n\t$dir = @opendir($path.\"\/\".$currentdir);\n\t$exts = '\/('.$ext.')$\/i';\n\t$skips = explode(',', $skip);\n\n\twhile($entry = @readdir($dir)) {\n\t\t$file = $currentdir.$entry;\n\t\tif($entry != '.' &amp;&amp; $entry != '..' &amp;&amp; (($ext &amp;&amp; preg_match($exts, $entry) || !$ext) || $sub &amp;&amp; is_dir($file)) &amp;&amp; !in_array($entry, $skips)) {\n\t\t\tif($sub &amp;&amp; is_dir($file)) {\n\t\t\t\tcheckfiles($file.'\/', $ext, $sub, $skip);\n\t\t\t} else {\n\t\t\t\tif(is_dir($file)) {\n\t\t\t\t\t$md5data[$file] = md5($file);\n\t\t\t\t} else {\n\t\t\t\t\t$md5data[$file] = md5_file($file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\nadds\n?&gt;<\/pre>\n<pre class=\"brush:php\">\u8fd9\u4e2a\u811a\u672c\u4fdd\u5b58\u540e\u53ef\u4ee5\u5728\u4e0a\u4f20\u6587\u4ef6\u4e4b\u540e\u5b89\u88c5\u4e4b\u524d\u6821\u9a8c\u6587\u4ef6\u3002<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&lt;?php if(!$discuzfiles = @f&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-discuz"],"_links":{"self":[{"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.uut8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=31"}],"version-history":[{"count":0,"href":"https:\/\/www.uut8.com\/index.php?rest_route=\/wp\/v2\/posts\/31\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.uut8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.uut8.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.uut8.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}