mirror of
https://github.com/flucont/btcloud.git
synced 2025-01-22 20:58:14 -05:00
update
This commit is contained in:
parent
ef99d79f1a
commit
4c76ec2056
@ -387,6 +387,7 @@ class Api extends BaseController
|
||||
return json(['page'=>"<div><span class='Pcurrent'>1</span><span class='Pnumber'>1/0</span><span class='Pline'>从1-1000条</span><span class='Pcount'>共计0条数据</span></div>", 'data'=>[]]);
|
||||
}
|
||||
|
||||
//获取所有蜘蛛IP列表
|
||||
public function btwaf_getspiders(){
|
||||
try{
|
||||
$result = Plugins::btwaf_getspiders();
|
||||
@ -396,6 +397,14 @@ class Api extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
//分类获取蜘蛛IP列表
|
||||
public function get_spider(){
|
||||
$type = input('get.spider/d');
|
||||
if(!$type) return json([]);
|
||||
$result = Plugins::get_spider($type);
|
||||
return json($result);
|
||||
}
|
||||
|
||||
//检查黑白名单
|
||||
private function checklist(){
|
||||
if(config_get('whitelist') == 1){
|
||||
|
@ -151,4 +151,18 @@ class Plugins
|
||||
return $result;
|
||||
}
|
||||
|
||||
//分类获取蜘蛛IP列表
|
||||
public static function get_spider($type){
|
||||
$result = cache('get_spider_'.$type);
|
||||
if($result){
|
||||
return $result;
|
||||
}
|
||||
$url = 'https://www.bt.cn/api/panel/get_spider?spider='.$type;
|
||||
$data = get_curl($url);
|
||||
$result = json_decode($data, true);
|
||||
if(!$result) return [];
|
||||
cache('get_spider_'.$type, $result, 3600 * 24);
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
@ -26,6 +26,7 @@ Route::group('authorization', function () {
|
||||
Route::post('/info', 'api/authorization_info');
|
||||
Route::post('/info_v2', 'api/authorization_info');
|
||||
Route::post('/update_license', 'api/update_license');
|
||||
Route::post('/get_unactivated_licenses', 'api/get_ssl_list');
|
||||
Route::post('/is_obtained_btw_trial', 'api/is_obtained_btw_trial');
|
||||
Route::miss('api/return_error');
|
||||
});
|
||||
@ -109,11 +110,13 @@ Route::group('api', function () {
|
||||
Route::get('/wpanel/get_beta_logs', 'api/get_beta_logs');
|
||||
|
||||
Route::post('/v2/common_v1_authorization/get_pricing', 'api/return_error2');
|
||||
Route::post('/v2/common_v2_authorization/get_pricing', 'api/return_error2');
|
||||
|
||||
Route::any('/bt_waf/getSpiders', 'api/btwaf_getspiders');
|
||||
Route::post('/bt_waf/addSpider', 'api/return_empty');
|
||||
Route::post('/bt_waf/getVulScanInfoList', 'api/return_empty');
|
||||
Route::post('/bt_waf/reportInterceptFail', 'api/return_empty');
|
||||
Route::any('/panel/get_spider', 'api/get_spider');
|
||||
|
||||
Route::miss('api/return_error');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user