diff --git a/app/middleware/ViewOutput.php b/app/middleware/ViewOutput.php
index d1e94a3..c26676f 100644
--- a/app/middleware/ViewOutput.php
+++ b/app/middleware/ViewOutput.php
@@ -18,7 +18,7 @@ class ViewOutput
{
View::assign('islogin', $request->islogin);
View::assign('user', $request->user);
- View::assign('cdn_cdnjs', config_get('cdn_cdnjs', '//cdn.staticfile.org/'));
+ View::assign('cdn_cdnjs', config_get('cdn_cdnjs', '//lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/'));
View::assign('cdn_npm', config_get('cdn_npm', 'https://unpkg.com/'));
View::config(['view_path' => template_path_get()]);
return $next($request)->header([
diff --git a/composer.lock b/composer.lock
index 0e56a7c..9340a59 100644
--- a/composer.lock
+++ b/composer.lock
@@ -8,20 +8,20 @@
"packages": [
{
"name": "cccyun/think-captcha",
- "version": "3.0.7",
+ "version": "3.0.9",
"source": {
"type": "git",
"url": "https://github.com/netcccyun/think-captcha.git",
- "reference": "ba2997f1c3fbcf2aae3dd5a80c8285a957121523"
+ "reference": "dcbc3f2cc29749c962cc8ad5d12ae59a30d73b24"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/netcccyun/think-captcha/zipball/ba2997f1c3fbcf2aae3dd5a80c8285a957121523",
- "reference": "ba2997f1c3fbcf2aae3dd5a80c8285a957121523",
+ "url": "https://api.github.com/repos/netcccyun/think-captcha/zipball/dcbc3f2cc29749c962cc8ad5d12ae59a30d73b24",
+ "reference": "dcbc3f2cc29749c962cc8ad5d12ae59a30d73b24",
"shasum": ""
},
"require": {
- "topthink/framework": "^6.0.0"
+ "topthink/framework": "^6.0|^8.0"
},
"type": "library",
"extra": {
@@ -54,9 +54,9 @@
],
"description": "captcha package for thinkphp",
"support": {
- "source": "https://github.com/netcccyun/think-captcha/tree/3.0.7"
+ "source": "https://github.com/netcccyun/think-captcha/tree/3.0.9"
},
- "time": "2022-10-21T03:33:53+00:00"
+ "time": "2023-06-02T03:38:07+00:00"
},
{
"name": "khanamiryan/qrcode-detector-decoder",
@@ -163,25 +163,25 @@
},
{
"name": "psr/http-message",
- "version": "1.0.1",
+ "version": "1.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
+ "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
+ "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.1.x-dev"
}
},
"autoload": {
@@ -210,9 +210,9 @@
"response"
],
"support": {
- "source": "https://github.com/php-fig/http-message/tree/master"
+ "source": "https://github.com/php-fig/http-message/tree/1.1"
},
- "time": "2016-08-06T14:39:51+00:00"
+ "time": "2023-04-04T09:50:52+00:00"
},
{
"name": "psr/log",
@@ -317,16 +317,16 @@
},
{
"name": "topthink/framework",
- "version": "v6.1.2",
+ "version": "v6.1.4",
"source": {
"type": "git",
"url": "https://github.com/top-think/framework.git",
- "reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3"
+ "reference": "66eb9cf4d627df12911344cd328faf9bb596bf2c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/top-think/framework/zipball/67235be5b919aaaf1de5aed9839f65d8e766aca3",
- "reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3",
+ "url": "https://api.github.com/repos/top-think/framework/zipball/66eb9cf4d627df12911344cd328faf9bb596bf2c",
+ "reference": "66eb9cf4d627df12911344cd328faf9bb596bf2c",
"shasum": ""
},
"require": {
@@ -376,9 +376,9 @@
],
"support": {
"issues": "https://github.com/top-think/framework/issues",
- "source": "https://github.com/top-think/framework/tree/v6.1.2"
+ "source": "https://github.com/top-think/framework/tree/v6.1.4"
},
- "time": "2023-02-08T02:24:01+00:00"
+ "time": "2023-07-11T15:16:03+00:00"
},
{
"name": "topthink/think-helper",
@@ -428,24 +428,27 @@
},
{
"name": "topthink/think-migration",
- "version": "v3.0.5",
+ "version": "v3.1.1",
"source": {
"type": "git",
"url": "https://github.com/top-think/think-migration.git",
- "reference": "7a5ec3952ea97bf1a5d8872e1bd10f2abf6294ca"
+ "reference": "22c44058e1454f3af1d346e7f6524fbe654de7fb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/top-think/think-migration/zipball/7a5ec3952ea97bf1a5d8872e1bd10f2abf6294ca",
- "reference": "7a5ec3952ea97bf1a5d8872e1bd10f2abf6294ca",
+ "url": "https://api.github.com/repos/top-think/think-migration/zipball/22c44058e1454f3af1d346e7f6524fbe654de7fb",
+ "reference": "22c44058e1454f3af1d346e7f6524fbe654de7fb",
"shasum": ""
},
"require": {
- "topthink/framework": "^6.0",
+ "php": ">=7.2",
+ "topthink/framework": "^6.0 || ^8.0",
"topthink/think-helper": "^3.0.3"
},
"require-dev": {
- "fzaninotto/faker": "^1.8"
+ "composer/composer": "^2.5.8",
+ "fzaninotto/faker": "^1.8",
+ "robmorgan/phinx": "^0.13.4"
},
"suggest": {
"fzaninotto/faker": "Required to use the factory builder (^1.8)."
@@ -460,7 +463,7 @@
},
"autoload": {
"psr-4": {
- "Phinx\\": "phinx/src/Phinx",
+ "Phinx\\": "phinx",
"think\\migration\\": "src"
}
},
@@ -476,22 +479,22 @@
],
"support": {
"issues": "https://github.com/top-think/think-migration/issues",
- "source": "https://github.com/top-think/think-migration/tree/v3.0.5"
+ "source": "https://github.com/top-think/think-migration/tree/v3.1.1"
},
- "time": "2023-02-26T13:16:22+00:00"
+ "time": "2023-09-14T05:51:31+00:00"
},
{
"name": "topthink/think-orm",
- "version": "v2.0.60",
+ "version": "v2.0.61",
"source": {
"type": "git",
"url": "https://github.com/top-think/think-orm.git",
- "reference": "8bc34a4307fa27186c0e96a9b3de3cb23aa1ed46"
+ "reference": "10528ebf4a5106b19c3bac9c6deae7a67ff49de6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/top-think/think-orm/zipball/8bc34a4307fa27186c0e96a9b3de3cb23aa1ed46",
- "reference": "8bc34a4307fa27186c0e96a9b3de3cb23aa1ed46",
+ "url": "https://api.github.com/repos/top-think/think-orm/zipball/10528ebf4a5106b19c3bac9c6deae7a67ff49de6",
+ "reference": "10528ebf4a5106b19c3bac9c6deae7a67ff49de6",
"shasum": ""
},
"require": {
@@ -531,9 +534,9 @@
],
"support": {
"issues": "https://github.com/top-think/think-orm/issues",
- "source": "https://github.com/top-think/think-orm/tree/v2.0.60"
+ "source": "https://github.com/top-think/think-orm/tree/v2.0.61"
},
- "time": "2023-03-19T04:51:56+00:00"
+ "time": "2023-04-20T14:27:51+00:00"
},
{
"name": "topthink/think-template",
@@ -621,16 +624,16 @@
"packages-dev": [
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
+ "reference": "42292d99c55abe617799667f454222c54c60e229"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
- "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
+ "reference": "42292d99c55abe617799667f454222c54c60e229",
"shasum": ""
},
"require": {
@@ -645,7 +648,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -684,7 +687,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0"
},
"funding": [
{
@@ -700,20 +703,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-07-28T09:04:16+00:00"
},
{
"name": "symfony/polyfill-php72",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
- "reference": "869329b1e9894268a8a61dabb69153029b7a8c97"
+ "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97",
- "reference": "869329b1e9894268a8a61dabb69153029b7a8c97",
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179",
+ "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179",
"shasum": ""
},
"require": {
@@ -722,7 +725,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -760,7 +763,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0"
},
"funding": [
{
@@ -776,20 +779,20 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.27.0",
+ "version": "v1.28.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
- "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
+ "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
"shasum": ""
},
"require": {
@@ -798,7 +801,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.27-dev"
+ "dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -843,7 +846,7 @@
"shim"
],
"support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0"
},
"funding": [
{
@@ -859,7 +862,7 @@
"type": "tidelift"
}
],
- "time": "2022-11-03T14:55:06+00:00"
+ "time": "2023-01-26T09:26:14+00:00"
},
{
"name": "symfony/var-dumper",
diff --git a/install.sql b/install.sql
index e0b5ea4..b35c6c6 100644
--- a/install.sql
+++ b/install.sql
@@ -48,7 +48,7 @@ INSERT INTO `toolbox_config` (`key`, `value`) VALUES
('captcha_id', ''),
('captcha_key', ''),
('ip_type', '0'),
-('cdn_cdnjs', '//cdn.staticfile.org/'),
+('cdn_cdnjs', '//lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/'),
('cdn_npm', 'https://unpkg.com/'),
('description', '这是一个非常Nice的在线工具箱'),
('foot_code', ''),
diff --git a/plugin/fun/bandwidth_waste/index.html b/plugin/fun/bandwidth_waste/index.html
index 68852e6..7b5c0e5 100644
--- a/plugin/fun/bandwidth_waste/index.html
+++ b/plugin/fun/bandwidth_waste/index.html
@@ -29,6 +29,36 @@
@@ -91,12 +121,14 @@ new Vue({
el: '#app',
data: {
set: {
- input: 'https://web1.cachefly.net/speedtest/downloading',
+ nodeurl: 'https://vipspeedtest8.wuhan.net.cn:8080/download?size=1073741824',
+ input: '',
output: '',
infinite: true,
status: false,
- thread: 1,
+ thread: 4,
},
+ node_list: [],
tasks: [],
speed: '0.00B/s',
spend: 0,
@@ -127,8 +159,14 @@ new Vue({
clearInterval(this.timer)
this.cancelSource.cancel()
}
+ },
+ 'set.nodeurl'(newVal) {
+ this.set.input = newVal
}
},
+ mounted() {
+ this.set.input = this.set.nodeurl
+ },
methods: {
run() {
this.set.status = !this.set.status
diff --git a/plugin/utility/imghosting/api/dianping.php b/plugin/utility/imghosting/api/dianping.php
index 6c070dc..a8b2d44 100644
--- a/plugin/utility/imghosting/api/dianping.php
+++ b/plugin/utility/imghosting/api/dianping.php
@@ -41,6 +41,9 @@ class dianping implements api
if($url){
$visitid = getSubstr($url, 'visitId=', '&');
if($visitid){
+ $url = 'https://kf.dianping.com/api/portal/message/init?visitId='.$visitid.'&accessToken=undefined';
+ $post = '{"type":"Init","parameters":{"isPreview":true,"build":null}}';
+ get_curl($url, $post);
cache('dianping_visitid', $visitid, 86400);
return $visitid;
}
diff --git a/plugin/utility/unicloud/App.php b/plugin/utility/unicloud/App.php
deleted file mode 100644
index d37c4b7..0000000
--- a/plugin/utility/unicloud/App.php
+++ /dev/null
@@ -1,87 +0,0 @@
-view();
- }
-
- public function preUpload(){
- if(!input('?post.filename'))exit('{"code":-1,"msg":"请选择文件"}');
-
- try{
- $this->getSession();
- } catch (Exception $e) {
- return ['code'=>-1, 'msg'=>'获取AccessToken失败:' . $e->getMessage()];
- }
-
- try{
- $result = $this->unicloud->pre_upload_file(input('post.filename'));
- $fileurl = 'https://'.$result['cdnDomain'].'/'.$result['ossPath'];
- session('unicloud_filename', input('post.filename'));
- session('unicloud_fileurl', $fileurl);
- return json(['code'=>0, 'data'=>$result]);
- } catch (Exception $e) {
- return json(['code'=>-1, 'msg'=>'准备文件上传失败:' . $e->getMessage()]);
- }
- }
-
- public function completeUpload(){
- if(!input('?post.id'))exit('{"code":-1,"msg":"no id"}');
-
- try{
- $this->getSession();
- } catch (Exception $e) {
- return ['code'=>-1, 'msg'=>'获取AccessToken失败:' . $e->getMessage()];
- }
-
- try{
- $result = $this->unicloud->complete_upload_file(input('post.id'));
-
- Db::name('uploadlog')->insert([
- 'uid' => request()->islogin ? request()->user['id'] : 0,
- 'type' => 'file',
- 'source' => 'unicloud',
- 'filename' => session('unicloud_filename'),
- 'fileurl' => session('unicloud_fileurl'),
- 'ip' => $this->clientip,
- 'addtime' => date("Y-m-d H:i:s")
- ]);
- session('unicloud_filename', null);
- session('unicloud_fileurl', null);
-
- return json(['code'=>0, 'data'=>$result]);
- } catch (Exception $e) {
- return json(['code'=>-1, 'msg'=>'完成文件上传失败:' . $e->getMessage()]);
- }
- }
-
- private function getSession(){
- include dirname(__FILE__).'/config.php';
- $this->unicloud = new UnicloudClient($spaceId, $clientSecret);
- if(session('access_token') && session('access_token_expire') && session('access_token_expire')>time()){
- $access_token = session('access_token');
- $this->unicloud->set_access_token($access_token);
- }else{
- $access_token = $this->unicloud->get_access_token();
- session('access_token', $access_token);
- session('access_token_expire', time()+600);
- }
- return null;
- }
-
-}
\ No newline at end of file
diff --git a/plugin/utility/unicloud/UnicloudClient.php b/plugin/utility/unicloud/UnicloudClient.php
deleted file mode 100644
index 214dee8..0000000
--- a/plugin/utility/unicloud/UnicloudClient.php
+++ /dev/null
@@ -1,144 +0,0 @@
-spaceId = $spaceId;
- $this->clientSecret = $clientSecret;
- }
-
- public function set_access_token($accessToken){
- $this->accessToken = $accessToken;
- }
-
- // 获取AccessToken
- public function get_access_token(){
- if(!empty($this->accessToken)) return $this->accessToken;
- $param = [
- 'method' => 'serverless.auth.user.anonymousAuthorize',
- 'params' => '{}',
- 'spaceId' => $this->spaceId,
- 'timestamp' => $this->msec_time()
- ];
- $sign = $this->get_sign($param);
- $payload = json_encode($param);
- $header = [
- 'x-serverless-sign: '.$sign
- ];
- $result = $this->curl_post($payload, $header);
- $this->accessToken = $result['accessToken'];
- return $this->accessToken;
- }
-
- // 获取文件上传信息
- public function pre_upload_file($filename){
- $method = 'serverless.file.resource.generateProximalSign';
- $params = [
- 'env' => 'public',
- 'filename' => $filename
- ];
- $result = $this->send_request($method, $params);
- return $result;
- }
-
- // 完成文件上传
- public function complete_upload_file($id){
- $method = 'serverless.file.resource.report';
- $params = [
- 'id' => $id
- ];
- $this->send_request($method, $params);
- return true;
- }
-
- // 删除文件(不支持阿里云)
- public function delete_file($id){
- $method = 'serverless.file.resource.delete';
- $params = [
- 'id' => $id
- ];
- $this->send_request($method, $params);
- return true;
- }
-
- private function send_request($method, $params){
- $access_token = $this->get_access_token();
- $postparam = [
- 'method' => $method,
- 'params' => json_encode($params),
- 'spaceId' => $this->spaceId,
- 'timestamp' => $this->msec_time(),
- 'token' => $access_token
- ];
- $sign = $this->get_sign($postparam);
- $payload = json_encode($postparam);
- $header = [
- 'x-basement-token: '.$access_token,
- 'x-serverless-sign: '.$sign
- ];
- $result = $this->curl_post($payload, $header);
- return $result;
- }
-
- private function get_sign($param){
- $signPars = "";
- ksort($param);
- foreach ($param as $k => $v) {
- if ($v != '') {
- $signPars .= $k . '=' . $v . '&';
- }
- }
- $signPars = substr($signPars, 0, -1);
- $sign = hash_hmac('md5', $signPars, $this->clientSecret);
- return $sign;
- }
-
- private function msec_time() {
- list($msec, $sec) = explode(' ', microtime());
- $msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);
- return $msectime;
- }
-
- private function curl_post($payload, $header){
- $url = $this->endpoint.'/client';
- $httpheader[] = "accept: */*";
- $httpheader[] = "accept-encoding: gzip,deflate,sdch";
- $httpheader[] = "accept-language: zh-CN,zh;q=0.8";
- $httpheader[] = "cache-control: no-cache";
- $httpheader[] = "content-type: application/json";
- $httpheader[] = "pragma: no-cache";
- $httpheader[] = "connection: close";
- $httpheader = array_merge($httpheader, $header);
- $ch=curl_init($url);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
- curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_TIMEOUT, 10);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
- curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36');
- $json=curl_exec($ch);
- $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
- curl_close($ch);
- if($httpCode==200){
- $arr=json_decode($json,true);
- if($arr['success'] == true){
- return $arr['data'];
- }else{
- throw new Exception($arr['error']['message'] ? $arr['error']['message'] : '未知错误');
- }
- }else{
- throw new Exception('curl error! httpcode='.$httpCode);
- }
- }
-}
diff --git a/plugin/utility/unicloud/config.php b/plugin/utility/unicloud/config.php
deleted file mode 100644
index dea8b8a..0000000
--- a/plugin/utility/unicloud/config.php
+++ /dev/null
@@ -1,5 +0,0 @@
-
-.btn-block {
- white-space:normal;
-}
-.btn-active {background-color: #1c2b46;color: #fff;}
-
-
-
-
-
-
-
工具说明
-
-
uniCloud文件快传底层使用阿里云OSS存储,支持任何格式的文件,也可以当图床使用。
-
一次只能上传1个文件,文件大小限制100M。一经上传,将无法删除,本站也不会保存。
-
-
-
-
-
-{/block}
-{block name="script"}
-
-
-{/block}
\ No newline at end of file
diff --git a/plugin/web/checkurl/App.php b/plugin/web/checkurl/App.php
index ddaf81f..9c3d9ec 100644
--- a/plugin/web/checkurl/App.php
+++ b/plugin/web/checkurl/App.php
@@ -28,7 +28,7 @@ class App extends Plugin
try{
if($type == 'wx'){
- $msg = $this->query_wx($link);
+ $msg = $this->query_wx2($link);
}else{
$msg = $this->query_qq($link);
}
@@ -39,6 +39,21 @@ class App extends Plugin
return msg('ok','success',$msg);
}
+ public function queryqq(){
+ $link = input('post.url', null, 'trim');
+ $randstr = input('post.randstr', null, 'trim');
+ $ticket = input('post.ticket', null, 'trim');
+ if(!$link) return msg('error','no url');
+
+ try{
+ $msg = $this->query_qq_new($link, $ticket, $randstr);
+ }catch(Exception $e){
+ return msg('error', $e->getMessage());
+ }
+
+ return msg('ok','success',$msg);
+ }
+
private function query_qq_old($link){
$url = 'https://cgi.urlsec.qq.com/index.php?m=gwComplainMergeIntoWechat&a=checkBlackStatus&callback=url_query&url='.urlencode($link);
$data=$this->guanjia_curl($url);
@@ -97,7 +112,53 @@ class App extends Plugin
}
}else{
+ $msg['检测URL'] = $link;
+ $msg['查询失败'] = $arr['data'];
+ }
+
+ return $msg;
+ }
+
+ private function query_qq_new($link, $ticket, $randstr){
+ $url='https://cgi.urlsec.qq.com/index.php?m=check&a=gw_check&callback=url_query&url='.urlencode($link).'&ticket='.$ticket.'&randstr='.urlencode($randstr).'&_='.time().'123';
+ $data=$this->guanjia_curl($url);
+ $arr = jsonp_decode($data, true);
+ if(!$arr) throw new Exception('查询接口返回数据解析失败');
+ if(isset($arr['reCode']) && $arr['reCode']==0) {
+ $arr = $arr['data']['results'];
+ //print_r($arr);
$msg['检测URL'] = $arr['url'];
+
+ if($arr['whitetype']==3||$arr['whitetype']==4){
+ $msg['域名状态'] = '白名单';
+ }elseif($arr['whitetype']==2){
+ $msg['域名状态'] = '已拦截';
+ $msg['拦截原因'] = $arr['WordingTitle'];
+ $msg['拦截详情'] = $arr['Wording'];
+ }elseif($arr['whitetype']==1){
+ if($arr['eviltype']!=0){
+ if($arr['eviltype']==2800 || $arr['eviltype']==2804)
+ $msg['域名状态'] = 'QQ内拦截';
+ else
+ $msg['域名状态'] = '其他拦截('.$arr['eviltype'].')';
+ }else{
+ $msg['域名状态'] = '未拦截
';
+ }
+ $msg['安全联盟认证'] = ($arr['certify']==1?'是':'否');
+ }
+ if($arr['detect_time']!=0){
+ $msg['记录时间'] = date("Y-m-d H:i:s", $arr['detect_time']);
+ }
+ if($arr['isDomainICPOk']==1){
+ $msg['是否已备案'] = '是';
+ $msg['备案主体'] = $arr['Orgnization'];
+ $msg['备案号'] = $arr['ICPSerial'];
+ }else{
+ $msg['是否已备案'] = '否';
+ }
+
+ }else{
+ $msg['检测URL'] = $link;
$msg['查询失败'] = $arr['data'];
}
@@ -129,6 +190,20 @@ class App extends Plugin
return $msg;
}
+ private function query_wx2($link){
+ $url = 'https://cgi.urlsec.qq.com/index.php?m=url&a=validUrl&url='.urlencode($link);
+ $data = get_curl($url);
+ $arr = json_decode($data, true);
+ if(!$arr) throw new Exception('查询接口返回数据解析失败');
+ $msg['检测URL'] = $link;
+ if(isset($arr['data']) && $arr['data']=='ok'){
+ $msg['微信拦截状态'] = '已拦截';
+ }else{
+ $msg['微信拦截状态'] = '未拦截';
+ }
+ return $msg;
+ }
+
private function guanjia_curl($url)
{
$ch = curl_init();
diff --git a/plugin/web/checkurl/index.html b/plugin/web/checkurl/index.html
index 352ef30..39e310a 100644
--- a/plugin/web/checkurl/index.html
+++ b/plugin/web/checkurl/index.html
@@ -16,7 +16,7 @@
-
@@ -44,6 +44,7 @@
{block name="script"}
+
diff --git a/plugin/web/icp/App.php b/plugin/web/icp/App.php
index b695c75..d0417f1 100644
--- a/plugin/web/icp/App.php
+++ b/plugin/web/icp/App.php
@@ -22,7 +22,7 @@ class App extends Plugin
public function query(){
$domain = input('post.domain', null, 'trim');
if(!$domain) return msg('error','no domain');
- if(strpos($domain,'.') && !checkdomain($domain)){
+ if(!checkdomain($domain)){
return msg('error', '域名格式不正确!');
}
@@ -31,129 +31,48 @@ class App extends Plugin
return msg('error', '验证失败,请重新验证');
}
- $cache = Db::name('querycache')->where('type', 'icplist')->where('key|subkey', $domain)->find();
+ $cache = Db::name('querycache')->where('type', 'icp')->where('key', $domain)->find();
if($cache && time() - strtotime($cache['uptime']) <= self::CACHE_TIME){
$array = json_decode($cache['content'], true);
- $data = Db::name('querycache')->where('type', 'icpitem')->whereIn('id', implode(',',$array['list']))->select();
- $list = [];
- foreach($data as $row){
- $list[] = json_decode($row['content'], true);
- }
- return msg('ok','success',['total'=>$array['total'], 'list'=>$list]);
- }
-
- $cache = Db::name('querycache')->where('type', 'icpitem')->where('key|subkey', $domain)->find();
- if($cache && time() - strtotime($cache['uptime']) <= self::CACHE_TIME){
- $array = json_decode($cache['content'], true);
- return msg('ok','success',['total'=>1, 'list'=>[$array]]);
+ return msg('ok','success',$array);
}
try{
- $result = $this->execapi($domain);
+ $result = $this->queryapi($domain);
+ if(!$result){
+ return msg('ok','success',null);
+ }
}catch(Exception $e){
return msg('error', $e->getMessage());
}
- if($result['total'] > 1 && count($result['data']) > 1){
- $i = 0;
- foreach($result['data'] as $row){
- $id = Db::name('querycache')->duplicate([
- 'subkey' => $row['webLicence'],
- 'content' => json_encode($row),
- 'uptime' => date('Y-m-d H:i:s')
- ])->insertGetId([
- 'type' => 'icpitem',
- 'key' => $row['domain'],
- 'subkey' => $row['webLicence'],
- 'content' => json_encode($row),
- 'uptime' => date('Y-m-d H:i:s')
- ]);
- $result['data'][$i++]['id'] = $id;
- $ids[] = $id;
- }
- Db::name('querycache')->duplicate([
- 'subkey' => $result['data'][0]['mainLicence'],
- 'content' => json_encode(['total'=>$result['total'], 'list'=>$ids]),
- 'uptime' => date('Y-m-d H:i:s')
- ])->insert([
- 'type' => 'icplist',
- 'key' => $result['data'][0]['unitName'],
- 'subkey' => $result['data'][0]['mainLicence'],
- 'content' => json_encode(['total'=>$result['total'], 'list'=>$ids]),
- 'uptime' => date('Y-m-d H:i:s')
- ]);
- }elseif($result['total'] == 1 && count($result['data']) > 0){
- $id = Db::name('querycache')->duplicate([
- 'subkey' => $result['data'][0]['webLicence'],
- 'content' => json_encode($result['data'][0]),
- 'uptime' => date('Y-m-d H:i:s')
- ])->insertGetId([
- 'type' => 'icpitem',
- 'key' => $result['data'][0]['domain'],
- 'subkey' => $result['data'][0]['webLicence'],
- 'content' => json_encode($result['data'][0]),
- 'uptime' => date('Y-m-d H:i:s')
- ]);
- $result['data'][0]['id'] = $id;
- }
+ Db::name('querycache')->duplicate([
+ 'type' => 'icp',
+ 'key' => $result['Domain'],
+ 'content' => json_encode($result),
+ 'uptime' => date('Y-m-d H:i:s')
+ ])->insert([
+ 'type' => 'icp',
+ 'key' => $result['Domain'],
+ 'content' => json_encode($result),
+ 'uptime' => date('Y-m-d H:i:s')
+ ]);
- return msg('ok','success',['total'=>$result['total'], 'list'=>$result['data']]);
+ return msg('ok','success',$result);
}
- public function item(){
- $id = input('post.id');
- if(!$id) return msg('error','no id');
- $cache = Db::name('querycache')->where('id', $id)->find();
- if($cache){
- $array = json_decode($cache['content'], true);
- return msg('ok','success',['total'=>1, 'list'=>[$array]]);
- }else{
- return msg('ok','success',['total'=>0, 'list'=>[]]);
- }
- }
-
- private function execapi($domain){
- $timeStamp = time();
- $authKey = md5("testtest" . $timeStamp);
- $referer = 'https://beian.miit.gov.cn/';
- $headers = ['Origin: https://beian.miit.gov.cn'];
- $url = 'https://hlwicpfwc.miit.gov.cn/icpproject_query/api/auth';
- $post = 'authKey='.$authKey.'&timeStamp='.$timeStamp;
- $response = get_curl($url, $post, $referer, 0, 1, 0, 0, $headers);
- $body = substr($response, strpos($response, '{"'));
- $arr = json_decode($body, true);
- if(isset($arr['code']) && $arr['code']==200){
- $cookie = '';
- preg_match_all('/set-cookie: (.*?);/i', $response, $matchs);
- foreach ($matchs[1] as $val) {
- if(substr($val,-1)=='=')continue;
- $cookie.=$val.'; ';
- }
-
- $token = $arr['params']['bussiness'];
-
- $url = 'https://hlwicpfwc.miit.gov.cn/icpproject_query/api/icpAbbreviateInfo/queryByCondition';
- $post = json_encode(['pageNum'=>'','pageSize'=>'','unitName'=>$domain,'serviceType'=>1]);
- $headers[] = 'Content-Type: application/json; charset=UTF-8';
- $headers[] = 'token: '.$token;
- $response = get_curl($url, $post, $referer, $cookie, 0, 0, 0, $headers);
- $arr = json_decode($response, true);
- if(isset($arr['code']) && $arr['code']==200){
- $list = [];
- foreach($arr['params']['list'] as $row){
- $list[] = ['domain'=>$row['domain'], 'mainLicence'=>$row['mainLicence'], 'webLicence'=>$row['serviceLicence'], 'unitName'=>$row['unitName'], 'unitType'=>$row['natureName'], 'updateTime'=>$row['updateRecordTime'], 'limitAccess'=>$row['limitAccess'], 'contentTypeName'=>$row['contentTypeName']];
- }
- return ['code'=>0, 'total'=>$arr['params']['total'], 'data'=>$list];
- }elseif(isset($arr['msg'])){
- throw new Exception($arr['msg']);
- }else{
- throw new Exception('查询接口(query)请求失败');
- }
-
+ private function queryapi($domain){
+ $url = config_get('qqapi_url').'api.php?act=icpquery';
+ $post = 'key='.config_get('qqapi_key').'&domain='.$domain;
+ $data = get_curl($url, $post);
+ $arr = json_decode($data, true);
+ if(isset($arr['code']) && $arr['code']==0){
+ return $arr['data'];
}elseif(isset($arr['msg'])){
throw new Exception($arr['msg']);
}else{
- throw new Exception('查询接口(auth)请求失败');
+ throw new Exception('接口请求失败');
}
}
+
}
\ No newline at end of file
diff --git a/plugin/web/icp/index.html b/plugin/web/icp/index.html
index b656a88..50672bf 100644
--- a/plugin/web/icp/index.html
+++ b/plugin/web/icp/index.html
@@ -2,22 +2,19 @@
{block name="title"}{$plugin.title} - {:config_get('title')}{/block}
{block name="main"}
-
+
@@ -30,48 +27,20 @@
- 没有查询到备案记录
-
-
域名 {{result_info.domain}} 的信息:
+
没有查询到备案信息
+
-
-
- | 网站域名 | {{result_info.domain}} |
- | ICP备案/许可证号 | {{result_info.webLicence}} |
- | 主办单位名称 | {{result_info.unitName}} |
- | 主办单位性质 | {{result_info.unitType}} |
- | 审核日期 | {{result_info.updateTime}} |
- | 是否限制接入 | {{result_info.limitAccess}} |
- | 网站前置审批项 | {{result_info.contentTypeName}} |
-
-
+
+
+ | 域名 | {{result_info.Domain}} |
+ | 备案号 | {{result_info.DomainIcpNum}} |
+ | 主办单位名称 | {{result_info.CompanyName}} |
+ | 主办单位性质 | {{result_info.CompanyType}} |
+ | 审核日期 | {{result_info.AuditTime}} |
+
+
-
-
{{result_input}} 共查询到 {{result_total}} 条备案信息:
-
-
-
- | 网站域名 | 网站备案号 | 主办单位名称 | 审核日期 | 操作 |
-
-
-
- | {{item.domain}} | {{item.webLicence}} | {{item.unitName}} | {{item.updateTime}} | 详情 |
-
-
-
-
-
当前只支持查询最新10条记录,剩余记录请使用域名或网站备案号进行精确查询。
-
-
-
-
-
-
简介
-
-
支持输入域名、网站备案号、主体备案号、单位名称(个人姓名、企业名称)进行查询
-
此ICP查询工具直接对接工信部官网,非第三方接口。查询源码下载,请勿对本站进行恶意抓取
-
@@ -86,21 +55,9 @@ new Vue({
data: {
query_disabled: true,
input: '',
- result_input: '',
showresult: false,
- result_info: {
- id: '',
- domain: '',
- mainLicence: '',
- webLicence: '',
- unitName: '',
- unitType: '',
- updateTime: '',
- limitAccess: '',
- contentTypeName: '',
- },
- result_list: [],
- result_total: 0,
+ result_info: [],
+ result_code: 0,
captcha: null
},
mounted() {
@@ -136,13 +93,12 @@ new Vue({
success: function (data) {
layer.closeAll();
if(data.status=='ok'){
- var data = data.data;
- that.result_input = that.input;
that.showresult = true;
- that.result_total = data.total;
- that.result_list = data.list;
- if(data.list.length > 0){
- that.result_info = data.list[0];
+ if(data.data == null){
+ that.result_code = 0;
+ }else{
+ that.result_code = 1;
+ that.result_info = data.data;
}
captcha.reset();
}else{
@@ -184,15 +140,11 @@ new Vue({
},
query() {
this.checkURL();
- if(this.input == ''){
+ if(this.input.trim() == ''){
alert('查询内容不能为空');return;
}
layer.load(0, {shade:0.1});
this.captcha.showCaptcha();
- },
- show_item(index){
- this.result_info = this.result_list[index];
- this.result_total = 1;
}
},
})
diff --git a/plugin/web/icp/python/cmd.txt b/plugin/web/icp/python/cmd.txt
deleted file mode 100644
index 94dc4f6..0000000
--- a/plugin/web/icp/python/cmd.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-yum -y install python3
-yum -y install mesa-libGL
-
-python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip
-pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
-
-pip3 install opencv-python==4.3.0.38
-pip3 install requests
-pip3 install flask
-pip3 install gevent
-
-nohup python3 ./server.py >> ./server.log 2>&1 &
diff --git a/plugin/web/icp/python/icp.py b/plugin/web/icp/python/icp.py
deleted file mode 100644
index f81b587..0000000
--- a/plugin/web/icp/python/icp.py
+++ /dev/null
@@ -1,165 +0,0 @@
-# -*- coding: utf-8 -*-
-import requests,hashlib,time,base64,cv2,os
-def icpquery(info):
- if(info == None or len(info) == 0):
- return {'code':-1,'msg':'no domain'}
- info_data = {
- 'pageNum':'',
- 'pageSize':'',
- 'unitName':info,
- 'serviceType':1
- }
-
- #构造AuthKey
- timeStamp = int(round(time.time()*1000))
- authSecret = 'testtest' + str(timeStamp)
- authKey = hashlib.md5(authSecret.encode(encoding='UTF-8')).hexdigest()
- #获取Cookie
- cookie_headers = {
- 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
- 'accept-encoding': 'gzip, deflate, br',
- 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
- 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36 Edg/90.0.818.42'
- }
- cookie = requests.utils.dict_from_cookiejar(requests.get('https://beian.miit.gov.cn/',headers=cookie_headers,verify=False).cookies)['__jsluid_s']
- #请求获取Token
- t_url = 'https://hlwicpfwc.miit.gov.cn/icpproject_query/api/auth'
- t_headers = {
- 'Host': 'hlwicpfwc.miit.gov.cn',
- 'Connection': 'keep-alive',
- 'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="90", "Microsoft Edge";v="90"',
- 'Accept': '*/*',
- 'DNT': '1',
- 'sec-ch-ua-mobile': '?0',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46',
- 'Origin': 'https://beian.miit.gov.cn',
- 'Sec-Fetch-Site': 'same-site',
- 'Sec-Fetch-Mode': 'cors',
- 'Sec-Fetch-Dest': 'empty',
- 'Referer': 'https://beian.miit.gov.cn/',
- 'Accept-Encoding': 'gzip, deflate, br',
- 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
- 'Cookie': '__jsluid_s=' + cookie
- }
- data = {
- 'authKey': authKey,
- 'timeStamp': timeStamp
- }
- t_response = requests.post(t_url,data=data,headers=t_headers,verify=False)
- try:
- get_token = t_response.json()['params']['bussiness']
- except:
- return {'code':-1,'msg':'请求被禁止,请稍后或更换头部与IP后再试('+t_response.status_code+')'}
-
- #获取验证图像、UUID
- p_url = 'https://hlwicpfwc.miit.gov.cn/icpproject_query/api/image/getCheckImage'
- p_headers = {
- 'Host': 'hlwicpfwc.miit.gov.cn',
- 'Connection': 'keep-alive',
- 'Content-Length': '0',
- 'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="90", "Microsoft Edge";v="90"',
- 'Accept': 'application/json, text/plain, */*',
- 'DNT': '1',
- 'sec-ch-ua-mobile': '?0',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46',
- 'token': get_token,
- 'Origin': 'https://beian.miit.gov.cn',
- 'Sec-Fetch-Site': 'same-site',
- 'Sec-Fetch-Mode': 'cors',
- 'Sec-Fetch-Dest': 'empty',
- 'Referer': 'https://beian.miit.gov.cn/',
- 'Accept-Encoding': 'gzip, deflate, br',
- 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
- 'Cookie': '__jsluid_s=' + cookie
- }
- p_request = requests.post(p_url,data='',headers=p_headers,verify=False)
- try:
- p_uuid = p_request.json()['params']['uuid']
- big_image = p_request.json()['params']['bigImage']
- small_image = p_request.json()['params']['smallImage']
- except KeyError:
- return {'code':-1,'msg':'获取验证图像失败,请重试('+p_request.status_code+')'}
-
- #解码图片,写入并计算图片缺口位置
- with open('bigImage.jpg','wb') as f:
- f.write(base64.b64decode(big_image))
- f.close()
- with open('smallImage.jpg','wb') as f:
- f.write(base64.b64decode(small_image))
- f.close()
- background_image = cv2.imread('bigImage.jpg',cv2.COLOR_GRAY2RGB)
- fill_image = cv2.imread('smallImage.jpg',cv2.COLOR_GRAY2RGB)
- background_image_canny = cv2.Canny(background_image, 100, 200)
- fill_image_canny = cv2.Canny(fill_image, 100, 300)
- position_match = cv2.matchTemplate(background_image, fill_image, cv2.TM_CCOEFF_NORMED)
- min_val,max_val,min_loc,max_loc = cv2.minMaxLoc(position_match)
- position = max_loc
- mouse_length = position[0]+1
- os.remove('bigImage.jpg')
- os.remove('smallImage.jpg')
-
- #通过拼图验证,获取sign
- check_url = 'https://hlwicpfwc.miit.gov.cn/icpproject_query/api/image/checkImage'
- check_headers = {
- 'Host': 'hlwicpfwc.miit.gov.cn',
- 'Accept': 'application/json, text/plain, */*',
- 'Connection': 'keep-alive',
- 'Content-Length': '60',
- 'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="90", "Microsoft Edge";v="90"',
- 'DNT': '1',
- 'sec-ch-ua-mobile': '?0',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36 Edg/90.0.818.42',
- 'token': get_token,
- 'Content-Type': 'application/json',
- 'Origin': 'https://beian.miit.gov.cn',
- 'Sec-Fetch-Site': 'same-site',
- 'Sec-Fetch-Mode': 'cors',
- 'Sec-Fetch-Dest': 'empty',
- 'Referer': 'https://beian.miit.gov.cn/',
- 'Accept-Encoding': 'gzip, deflate, br',
- 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
- 'Cookie': '__jsluid_s=' + cookie
- }
- check_data = {
- 'key':p_uuid,
- 'value':mouse_length
- }
- check_request = requests.post(check_url,json=check_data,headers=check_headers,verify=False)
- try:
- sign = check_request.json()['params']
- except Exception:
- return {'code':-1,'msg':'校验图片信息失败,请重试('+check_request.status_code+')'}
-
-
- #获取备案信息
- info_url = 'https://hlwicpfwc.miit.gov.cn/icpproject_query/api/icpAbbreviateInfo/queryByCondition'
- info_headers = {
- 'Host': 'hlwicpfwc.miit.gov.cn',
- 'Connection': 'keep-alive',
- 'Content-Length': '78',
- 'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="90", "Microsoft Edge";v="90"',
- 'DNT': '1',
- 'sec-ch-ua-mobile': '?0',
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36 Edg/90.0.818.42',
- 'Content-Type': 'application/json',
- 'Accept': 'application/json, text/plain, */*',
- 'uuid': p_uuid,
- 'token': get_token,
- 'sign': sign,
- 'Origin': 'https://beian.miit.gov.cn',
- 'Sec-Fetch-Site': 'same-site',
- 'Sec-Fetch-Mode': 'cors',
- 'Sec-Fetch-Dest': 'empty',
- 'Referer': 'https://beian.miit.gov.cn/',
- 'Accept-Encoding': 'gzip, deflate, br',
- 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
- 'Cookie': '__jsluid_s=' + cookie
- }
- info_request = requests.post(info_url,json=info_data,headers=info_headers,verify=False)
- domain_total = info_request.json()['params']['total']
- result_list = []
-
- for info_base in info_request.json()['params']['list']:
- result_list.append({'domain':info_base['domain'], 'mainLicence':info_base['mainLicence'], 'webLicence':info_base['serviceLicence'], 'unitName':info_base['unitName'], 'unitType':info_base['natureName'], 'updateTime':info_base['updateRecordTime'], 'limitAccess':info_base['limitAccess'], 'contentTypeName':info_base['contentTypeName']})
-
- return {'code':0,'msg':'success','data':result_list, 'total':domain_total}
diff --git a/plugin/web/icp/python/server.py b/plugin/web/icp/python/server.py
deleted file mode 100644
index 8980ad2..0000000
--- a/plugin/web/icp/python/server.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# -*- coding: utf-8 -*-
-import icp,json,flask
-
-HOST='127.0.0.1'
-PORT=9088
-
-app = flask.Flask(__name__)
-json_header = {'Content-Type':'application/json; charset=utf-8'}
-
-@app.route('/',methods=['GET'])
-def home():
- domain = flask.request.args.get('domain')
- result = icp.icpquery(domain)
- return flask.Response(json.dumps(result),headers=json_header)
-
-@app.errorhandler(404)
-def notfound(e):
- errorStr = '''
-
404 Not Found
-
-
404 Not Found
-
server
-
-'''
- headers = {
- "Content-Type":"text/html"
- }
- return flask.Response(errorStr,status=404,headers=headers)
-
-if __name__ == '__main__':
- from gevent.pywsgi import WSGIServer
- http_server = WSGIServer((HOST, PORT), app)
- http_server.serve_forever()
- #app.run(port=PORT,host=HOST)
diff --git a/plugin/wqq/qqlevel/App.php b/plugin/wqq/qqlevel/App.php
index c67d5b5..f8944e9 100644
--- a/plugin/wqq/qqlevel/App.php
+++ b/plugin/wqq/qqlevel/App.php
@@ -49,9 +49,8 @@ class App extends Plugin
}
private function queryapi($uin){
- //此处需填写QQAPI的接口地址(https://github.com/netcccyun/qqapi)
- $url = 'http://qqapiurl/api.php?act=getqqlevel';
- $post = 'key=查询密钥&uin='.$uin;
+ $url = config_get('qqapi_url').'api.php?act=getqqlevel';
+ $post = 'key='.config_get('qqapi_key').'&uin='.$uin;
$data = get_curl($url, $post);
$arr = json_decode($data, true);
if(isset($arr['code']) && $arr['code']==0){
diff --git a/public/404.html b/public/404.html
index b5491f5..ec95751 100644
--- a/public/404.html
+++ b/public/404.html
@@ -6,7 +6,7 @@
-
+
@@ -123,7 +123,7 @@
-
+
-
+
+