#!/usr/bin/python
import json #line:12
from projectModel .base import projectBase #line:14
import os ,re ,time #line:15
import public #line:16
from BTPanel import cache #line:17
class main (projectBase ):#line:20
    __OO0O00000O0O0O000 =public .Md5 ('vulnerability_scanning')#line:21
    __O0000O0O00OO0OO00 ='/www/server/panel/config/vulnerability_scanning.json'#line:22
    __O000O000O0OOO000O =public .to_string ([27492 ,21151 ,33021 ,20026 ,20225 ,19994 ,29256 ,19987 ,20139 ,21151 ,33021 ,65292 ,35831 ,20808 ,36141 ,20080 ,20225 ,19994 ,29256 ])#line:25
    def __OO00OO00O00000OOO (O0000O000O0OOO0O0 ):#line:27
        try :#line:28
            from pluginAuth import Plugin #line:29
            OO0OOO0O0OOO0OOO0 =Plugin (False )#line:30
            OO000O00OOO0OOO00 =OO0OOO0O0OOO0OOO0 .get_plugin_list ()#line:31
            if int (OO000O00OOO0OOO00 ['ltd'])>time .time ():#line:32
                return True #line:33
            return False #line:34
        except :#line:35
            return False #line:36
    def write_config (O0O0O0OO0OO000O00 ,config =False ):#line:38
        ""#line:44
        if config :#line:45
            public .WriteFile (O0O0O0OO0OO000O00 .__O0000O0O00OO0OO00 ,json .dumps (config ))#line:46
        else :#line:47
            public .WriteFile (O0O0O0OO0OO000O00 .__O0000O0O00OO0OO00 ,json .dumps (O0O0O0OO0OO000O00 .getDefaultCms ()))#line:48
    def get_yun_config (OO0OO0O0OO00O00O0 ):#line:50
        ""#line:54
        try :#line:55
            import requests #line:56
            OO0000OOO000OO00O =requests .get ("http://www.bt.cn/api/bt_waf/scanRules").json ()#line:57
            OO0OO0O0OO00O00O0 .write_config (OO0000OOO000OO00O )#line:58
        except :#line:59
            return False #line:60
    def get_config (OOOO00O0000OOO00O ):#line:62
        ""#line:67
        if not os .path .exists (OOOO00O0000OOO00O .__O0000O0O00OO0OO00 ):#line:68
            return OOOO00O0000OOO00O .getDefaultCms ()#line:70
        else :#line:71
            try :#line:72
                O0OO0OO0OOO0OOOO0 =json .loads (public .ReadFile (OOOO00O0000OOO00O .__O0000O0O00OO0OO00 ))#line:73
            except :#line:74
                return OOOO00O0000OOO00O .getDefaultCms ()#line:76
        if not cache .get (OOOO00O0000OOO00O .__OO0O00000O0O0O000 ):#line:77
            cache .set (OOOO00O0000OOO00O .__OO0O00000O0O0O000 ,'1',3600 )#line:78
            public .run_thread (OOOO00O0000OOO00O .get_yun_config )#line:79
            return O0OO0OO0OOO0OOOO0 #line:80
        else :#line:81
            return O0OO0OO0OOO0OOOO0 #line:82
    def getDefaultCms (O00OO0OO0O0O0OO0O ):#line:84
        ""#line:88
        OOOO0000O00OO00OO =[{"cms_list":[],"dangerous":"2","cms_name":"迅睿CMS","ps":"迅睿CMS 版本过低","name":"迅睿CMS 版本过低","determine":["dayrui/My/Config/Version.php"],"version":{"type":"file","file":"dayrui/My/Config/Version.php","regular":"version.+'(\d+.\d+.\d+)'","regular_len":0 ,"vul_version":"3.2.0~4.5.4","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"dayrui/My/Config/Version.php","regular":''' if (preg_match('/(php|jsp|asp|exe|sh|cmd|vb|vbs|phtml)/i', $value)) {'''}]},"repair":"修复建议 : https://www.xunruicms.com/bug/ \n升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"pbootcms","ps":"pbootcms 3.0.0~3.0.4 存在多个高危漏洞CNVD-2020-48981,CNVD-2020-48677,CNVD-2020-48469,CNVD-2020-57593,CNVD-2020-56006,CNVD-2021-00794,CNVD-2021-30081,CNVD-2021-30113,CNVD-2021-32163","name":"pbootcms 2.0.0~2.0.8 存在多个高危漏洞CNVD-2020-48981,CNVD-2020-48677,CNVD-2020-48469,CNVD-2020-57593,CNVD-2020-56006,CNVD-2021-00794,CNVD-2021-30081,CNVD-2021-30113,CNVD-2021-32163","determine":["apps/common/version.php","core/basic/Config.php","apps/admin/view/default/js/mylayui.js","apps/api/controller/ContentController.php"],"version":{"type":"file","file":"apps/common/version.php","regular":"app_version.+'(\d+.\d+.\d+)'","regular_len":0 ,"vul_version":"3.0.0~3.0.4","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"apps/admin/controller/system/ConfigController.php","regular":''' if (preg_match('/(php|jsp|asp|exe|sh|cmd|vb|vbs|phtml)/i', $value)) {'''}]},"repair":"修复建议 : https://www.pbootcms.com/changelog/ \n升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"pbootcms","ps":"pbootcms 2.0.0~2.0.8 存在多个高危漏洞CNVD-2020-04104,CNVD-2020-13536,CNVD-2020-24744,CNVD-2020-32198,CNVD-2020-32180,CNVD-2020-32177,CNVD-2020-31495,CNVD-2019-43060","name":"pbootcms 2.0.0~2.0.8 存在多个高危漏洞CNVD-2020-04104,CNVD-2020-13536,CNVD-2020-24744,CNVD-2020-32198,CNVD-2020-32180,CNVD-2020-32177,CNVD-2020-31495,CNVD-2019-43060","determine":["apps/common/version.php","core/basic/Config.php","apps/admin/view/default/js/mylayui.js","apps/api/controller/ContentController.php"],"version":{"type":"file","file":"apps/common/version.php","regular":"app_version.+'(\d+.\d+.\d+)'","regular_len":0 ,"vul_version":"2.0.0~2.0.8","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"apps/home/controller/ParserController.php","regular":''' if (preg_match('/(\$_GET\[)|(\$_POST\[)|(\$_REQUEST\[)|(\$_COOKIE\[)|(\$_SESSION\[)|(file_put_contents)|(file_get_contents)|(fwrite)|(phpinfo)|(base64)|(`)|(shell_exec)|(eval)|(assert)|(system)|(exec)|(passthru)|(print_r)|(urldecode)|(chr)|(include)|(request)|(__FILE__)|(__DIR__)|(copy)/i', $matches[1][$i]))'''}]},"repair":"修复建议 : https://www.pbootcms.com/changelog/ \n升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"pbootcms","ps":"pbootcms 1.3.0~1.3.8 存在多个高危漏洞CNVD-2018-26355,CNVD-2018-24253,CNVD-2018-26938,CNVD-2019-14855,CNVD-2019-27743,CNVD-2020-23841","name":"pbootcms 1.3.0~1.3.8 存在多个高危漏洞CNVD-2018-26355,CNVD-2018-24253,CNVD-2018-26938,CNVD-2019-14855,CNVD-2019-27743,CNVD-2020-23841","determine":["apps/common/version.php","core/basic/Config.php","apps/admin/view/default/js/mylayui.js","apps/api/controller/ContentController.php"],"version":{"type":"file","file":"apps/common/version.php","regular":"app_version.+'(\d+.\d+.\d+)'","regular_len":0 ,"vul_version":"1.3.0~1.3.8","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"apps/admin/controller/system/ConfigController.php","regular":'''$config = preg_replace('/(\'' . $key . '\'([\s]+)?=>([\s]+)?)[\w\'\"\s,]+,/', '${1}\'' . $value . '\',', $config);'''}]},"repair":"修复建议 : https://www.pbootcms.com/changelog/ \n升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"pbootcms","ps":"pbootcms 1.2.0~1.2.2 存在多个高危漏洞CNVD-2018-21503,CNVD-2018-19945,CNVD-2018-22854,CNVD-2018-22142,CNVD-2018-26780,CNVD-2018-24845","name":"pbootcms 1.0.1~1.2.2 存在多个高危漏洞CNVD-2018-21503,CNVD-2018-19945,CNVD-2018-22854,CNVD-2018-22142,CNVD-2018-26780,CNVD-2018-24845","determine":["apps/common/version.php","core/basic/Config.php","apps/admin/view/default/js/mylayui.js","apps/api/controller/ContentController.php"],"version":{"type":"file","file":"apps/common/version.php","regular":"app_version.+'(\d+.\d+.\d+)'","regular_len":0 ,"vul_version":["1.2.0","1.2.1","1.2.2"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"apps/admin/controller/system/DatabaseController.php","regular":'''if ($value && ! preg_match('/(^|[\s]+)(drop|truncate|set)[\s]+/i', $value)) {'''}]},"repair":"修复建议 : https://www.pbootcms.com/changelog/ \n升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"pbootcms","ps":"pbootcms 1.1.9 存在SQL注入漏洞CNVD-2018-18069","name":"pbootcms 1.1.9 存在SQL注入漏洞CNVD-2018-18069","determine":["apps/common/version.php","core/basic/Config.php","apps/admin/view/default/js/mylayui.js","apps/api/controller/ContentController.php"],"version":{"type":"file","file":"apps/common/version.php","regular":"app_version.+'(\d+.\d+.\d+)'","regular_len":0 ,"vul_version":["1.1.9"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"core/function/handle.php","regular":'''if (Config::get('url_type') == 2 && strrpos($indexfile, 'index.php') !== false)'''}]},"repair":"修复建议 : https://www.pbootcms.com/changelog/ \n升级到最新版"},{"cms_list":[],"dangerous":"4","cms_name":"pbootcms","ps":"pbootcms 1.1.6~1.1.8 存在前台代码执行漏洞、存在多个SQL注入漏洞 CNVD-2018-17412,CNVD-2018-17741,CNVD-2018-17747,CNVD-2018-17750,CNVD-2018-17751,CNVD-2018-17752,CNVD-2018-17753,CNVD-2018-17754","name":"pbootcms 1.1.6~1.1.8  存在前台代码执行漏洞、存在多个SQL注入漏洞 CNVD-2018-17412,CNVD-2018-17741,CNVD-2018-17747,CNVD-2018-17750,CNVD-2018-17751,CNVD-2018-17752,CNVD-2018-17753,CNVD-2018-17754","determine":["apps/common/version.php","core/basic/Config.php","apps/admin/view/default/js/mylayui.js","apps/api/controller/ContentController.php"],"version":{"type":"file","file":"apps/common/version.php","regular":"app_version.+'(\d+.\d+.\d+)'","regular_len":0 ,"vul_version":["1.1.6","1.1.7","1.1.8"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"core/function/handle.php","regular":'''if (is_array($string)) { // 数组处理
        foreach ($string as $key => $value) {
            $string[$key] = decode_slashes($value);
        }'''}]},"repair":"修复建议 : https://www.pbootcms.com/changelog/ \n升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"pbootcms","ps":"pbootcms 1.1.4 存在SQL注入漏洞CNVD-2018-13335,CNVD-2018-13336","name":"pbootcms 1.1.4 存在SQL注入漏洞CNVD-2018-13335,CNVD-2018-13336","determine":["apps/common/version.php","core/basic/Config.php","apps/admin/view/default/js/mylayui.js","apps/api/controller/ContentController.php"],"version":{"type":"file","file":"apps/common/version.php","regular":"app_version.+'(\d+.\d+.\d+)'","regular_len":0 ,"vul_version":["1.1.4"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"core/extend/ueditor/php/controller.php","regular":'''if (! ini_get('session.auto_start') && ! isset($_SESSION)'''}]},"repair":"修复建议 : https://www.pbootcms.com/changelog/ \n升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"maccms10","ps":"maccms10 <=2022.1000.3025 存在ssrf漏洞、存在XSS漏洞","name":"maccms10 <=2022.1000.3025 存在ssrf漏洞、存在XSS漏洞","determine":["application/extra/version.php","application/api/controller/Wechat.php","thinkphp/library/think/Route.php","application/admin/controller/Upload.php"],"version":{"type":"file","file":"application/extra/version.php","regular":"code.+'(\d+.\d+.\d+)'","regular_len":0 ,"vul_version":["2022.1000.3025","2022.1000.3005","2022.1000.3024","2022.1000.3020","2022.1000.3023","2022.1000.3002","2022.1000.1099","2021.1000.1081"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"application/common/model/Actor.php","regular":'''$data[$filter_field] = mac_filter_xss($data[$filter_field]);'''}]},"repair":"修复建议 : https://github.com/magicblack/maccms10/releases \n升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"maccms10","ps":"maccms10 <=2022.1000.3024 存在前台任意用户登陆、后台会话验证绕过、后台任意文件写入、任意文件删除漏洞","name":"maccms10 <=2022.1000.3024 存在前台任意用户登陆、后台会话验证绕过、后台任意文件写入、任意文件删除漏洞","determine":["application/extra/version.php","application/api/controller/Wechat.php","thinkphp/library/think/Route.php","application/admin/controller/Upload.php"],"version":{"type":"file","file":"application/extra/version.php","regular":"code.+'(\d+.\d+.\d+)'","regular_len":0 ,"vul_version":["2022.1000.3005","2022.1000.3024","2022.1000.3020","2022.1000.3023","2022.1000.3002","2022.1000.1099","2021.1000.1081"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"application/common/model/Annex.php","regular":'''if (stripos($v['annex_file'], '../') !== false)'''}]},"repair":"修复建议 : https://github.com/magicblack/maccms10/releases \n升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"eyoucms","ps":"eyoucms 1.5.5~1.5.7 存在多个安全漏洞","name":"eyoucms 1.5.1~1.5.4 存在多个安全漏洞","determine":["data/conf/version.txt","application/api/controller/Uploadify.php","application/extra/extra_cache_key.php","application/admin/controller/Uploadify.php"],"version":{"type":"file","file":"data/conf/version.txt","regular":"(\d+.\d+.\d+)","regular_len":0 ,"vul_version":"1.5.5~1.5.7","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"application/common.php","regular":'''$login_errnum_key = 'adminlogin_'.md5('login_errnum_'.$admin_info['user_name']);'''}]},"repair":"修复建议 : https://www.eyoucms.com/rizhi/ \n升级eyoucms到最新版"},{"cms_list":[],"dangerous":"4","cms_name":"eyoucms","ps":"eyoucms 1.5.1~1.5.4 存在多个高危安全漏洞,CNVD-2021-82431,CNVD-2021-82429,CNVD-2021-72772,CNVD-2021-51838,CNVD-2021-51836,CNVD-2021-41520,CNVD-2021-24745,,CNVD-2021-26007,CNVD-2021-26099,CNVD-2021-41520","name":"eyoucms 1.5.1~1.5.4 存在多个高危安全漏洞,CNVD-2021-82431,CNVD-2021-82429,CNVD-2021-72772,CNVD-2021-51838,CNVD-2021-51836,CNVD-2021-41520,CNVD-2021-24745,,CNVD-2021-26007,CNVD-2021-26099,CNVD-2021-41520","determine":["data/conf/version.txt","application/api/controller/Uploadify.php","application/extra/extra_cache_key.php","application/admin/controller/Uploadify.php"],"version":{"type":"file","file":"data/conf/version.txt","regular":"(\d+.\d+.\d+)","regular_len":0 ,"vul_version":"1.5.1~1.5.4","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"application/common.php","regular":'''$citysite_db->where(['domain'=>$s_arr[0]])->cache(true, EYOUCMS_CACHE_TIME, 'citysite')->count()'''}]},"repair":"修复建议 : https://www.eyoucms.com/rizhi/ \n升级eyoucms到最新版"},{"cms_list":[],"dangerous":"4","cms_name":"eyoucms","ps":"eyoucms 1.4.7 存在多个高危安全漏洞,CNVD-2020-46317,CNVD-2020-49065,CNVD-2020-44394,CNVD-2020-44392,CNVD-2020-44391,CNVD-2020-47671,CNVD-2020-50721","name":"eyoucms 1.4.7 存在多个高危安全漏洞,CNVD-2020-46317,CNVD-2020-49065,CNVD-2020-44394,CNVD-2020-44392,CNVD-2020-44391,CNVD-2020-47671,CNVD-2020-50721","determine":["data/conf/version.txt","application/api/controller/Uploadify.php","application/extra/extra_cache_key.php","application/admin/controller/Uploadify.php"],"version":{"type":"file","file":"data/conf/version.txt","regular":"(\d+.\d+.\d+)","regular_len":0 ,"vul_version":"1.4.7~1.4.7","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"application/common.php","regular":'''function GetTagIndexRanking($limit = 5, $field = 'id, tag')'''}]},"repair":"修复建议 : https://www.eyoucms.com/rizhi/ \n升级eyoucms到最新版"},{"cms_list":[],"dangerous":"4","cms_name":"eyoucms","ps":"eyoucms 1.4.6 存在多个高危安全漏洞,CNVD-2020-44116,CNVD-2020-32622,CNVD-2020-28132,CNVD-2020-28083,CNVD-2020-28064,CNVD-2020-33104","name":"eyoucms 1.4.6 存在多个高危安全漏洞,CNVD-2020-44116,CNVD-2020-32622,CNVD-2020-28132,CNVD-2020-28083,CNVD-2020-28064,CNVD-2020-33104","determine":["data/conf/version.txt","application/api/controller/Uploadify.php","application/extra/extra_cache_key.php","application/admin/controller/Uploadify.php"],"version":{"type":"file","file":"data/conf/version.txt","regular":"(\d+.\d+.\d+)","regular_len":0 ,"vul_version":"1.4.6~1.4.6","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"application/common.php","regular":'''preg_replace('#^(/[/\w]+)?(/uploads/|/public/static/)#i'''}]},"repair":"修复建议 : https://www.eyoucms.com/rizhi/ \n升级eyoucms到最新版"},{"cms_list":[],"dangerous":"4","cms_name":"eyoucms","ps":"eyoucms 1.3.9~1.4.4 存在多个安全漏洞CNVD-2020-02271,CNVD-2020-02824,CNVD-2020-18735,CNVD-2020-18677,CNVD-2020-23229,CNVD-2020-23805,CNVD-2020-23820","name":"eyoucms 1.3.9~1.4.4 存在多个安全漏洞CNVD-2020-02271,CNVD-2020-02824,CNVD-2020-18735,CNVD-2020-18677,CNVD-2020-23229,CNVD-2020-23805,CNVD-2020-23820","determine":["data/conf/version.txt","application/api/controller/Uploadify.php","application/extra/extra_cache_key.php","application/admin/controller/Uploadify.php"],"version":{"type":"file","file":"data/conf/version.txt","regular":"(\d+.\d+.\d+)","regular_len":0 ,"vul_version":"1.3.9~1.4.4","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"application/common.php","regular":'''$TimingTaskRow = model('Weapp')->getWeappList('TimingTask');'''}]},"repair":"修复建议 : https://www.eyoucms.com/rizhi/ \n升级eyoucms到最新版"},{"cms_list":[],"dangerous":"4","cms_name":"eyoucms","ps":"eyoucms 1.4.1 存在命令执行漏洞","name":"eyoucms 1.4.1 存在命令执行漏洞","determine":["data/conf/version.txt","application/api/controller/Uploadify.php","application/extra/extra_cache_key.php","application/admin/controller/Uploadify.php"],"version":{"type":"file","file":"data/conf/version.txt","regular":"(\d+.\d+.\d+)","regular_len":0 ,"vul_version":"1.4.1~1.4.1","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"application/route.php","regular":'''$weapp_route_file = 'plugins/route.php';'''}]},"repair":"修复建议 : https://www.eyoucms.com/rizhi/ \n升级eyoucms到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"eyoucms","ps":"eyoucms<=1.3.8 存在SQL注入、存在插件上传漏洞","name":"eyoucms<=1.3.8 存在SQL注入、存在插件上传漏洞","determine":["data/conf/version.txt","application/api/controller/Uploadify.php","application/extra/extra_cache_key.php","application/admin/controller/Uploadify.php"],"version":{"type":"file","file":"data/conf/version.txt","regular":"(\d+.\d+.\d+)","regular_len":0 ,"vul_version":"1.0.0~1.3.8","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"core/library/think/template/taglib/Eyou.php","regular":'''$notypeid  = !empty($tag['notypeid']) ? $tag['notypeid'] : '';'''}]},"repair":"修复建议 : https://www.eyoucms.com/rizhi/ \n升级eyoucms到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"eyoucms","ps":"eyoucms<=1.3.4 存在后台文件上传漏洞","name":"eyoucms<=1.3.4 存在后台文件上传漏洞","determine":["data/conf/version.txt","application/api/controller/Uploadify.php","application/extra/extra_cache_key.php","application/admin/controller/Uploadify.php"],"version":{"type":"file","file":"data/conf/version.txt","regular":"(\d+.\d+.\d+)","regular_len":0 ,"vul_version":"1.0.0~1.3.4","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"application/common.php","regular":'''include_once EXTEND_PATH."function.php";'''}]},"repair":"修复建议 : https://www.eyoucms.com/rizhi/ \n升级eyoucms到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"eyoucms","ps":"eyoucms 1.0 存在任意文件上传漏洞","name":"eyoucms 1.0 存在任意文件上传漏洞","determine":["data/conf/version.txt","application/api/controller/Uploadify.php","application/extra/extra_cache_key.php","application/admin/controller/Uploadify.php"],"version":{"type":"file","file":"data/conf/version.txt","regular":"(\d+.\d+.\d+)","regular_len":0 ,"vul_version":"1.0.0~1.1.0","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"application/api/controller/Uploadify.php","regular":'''目前没用到这个api接口'''}]},"repair":"修复建议 : https://www.eyoucms.com/rizhi/ \n升级eyoucms到最新版"},{"cms_list":[],"dangerous":"2","cms_name":"海洋CMS","ps":"海洋CMS 版本过低","name":"海洋CMS 版本过低","determine":["data/admin/ver.txt","include/common.php","include/main.class.php","detail/index.php"],"version":{"type":"file","file":"data/admin/ver.txt","regular":"(\d+.\d+?|\d+)","regular_len":0 ,"vul_version":["6.28","6.54","7.2","8.4","8.5","8.6","8.7","8.8","8.9","9","9.1","9.2","9.3","9.4","9.5","9.6","9.7","9.8","9.9","9.91","9.92","9.93","9.94","9.96","9.97","9.98","9.99","10","10.1","10.2","10.3","10.4","10.5","10.6","10.7","10.8","10.9","11","11.1","11.2","11.3","11.4","11.5"],"ver_type":"list"},"repair_file":{"type":"version","file":[]},"repair":"修复建议:" "升级到海洋CMS 最新版 https://www.seacms.net/p-549"},{"cms_list":[],"dangerous":"3","cms_name":"海洋CMS","ps":"海洋CMS <=9.95存在前台RCE","name":"海洋CMS <=9.95存在前台RCE","determine":["data/admin/ver.txt","include/common.php","include/main.class.php","detail/index.php"],"version":{"type":"file","file":"data/admin/ver.txt","regular":"(\d+.\d+?|\d+)","regular_len":0 ,"vul_version":["6.28","6.54","7.2","8.4","8.5","8.6","8.7","8.8","8.9","9","9.1","9.2","9.3","9.4","9.5","9.6","9.7","9.8","9.9","9.91","9.92","9.93","9.94"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"include/common.php","regular":''''$jpurl='//'.$_SERVER['SERVER_NAME']'''}]},"repair":"修复建议:" "升级到海洋CMS 最新版 https://www.seacms.net/p-549"},{"cms_list":[],"dangerous":"3","cms_name":"ThinkCMF","ps":"ThinkCMF CVE-2019-6713漏洞","name":"ThinkCMF CVE-2019-6713","determine":["public/index.php","app/admin/hooks.php","app/admin/controller/NavMenuController.php","simplewind/cmf/hooks.php"],"version":{"type":"file","file":"public/index.php","regular":"THINKCMF_VERSION.+'(\d+.\d+.\d+)'","regular_len":0 ,"vul_version":["5.0.190111","5.0.181231","5.0.181212","5.0.180901","5.0.180626","5.0.180525","5.0.180508"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"app/admin/validate/RouteValidate.php","regular":'''protected function checkUrl($value, $rule, $data)'''}]},"repair":"修复建议:" "1.修改代码 https://github.com/thinkcmf/thinkcmf/commit/217b6f8ad77a2917634bb9dd9c1f4ccf2c4c2930\n" "2.升级到最新版 https://github.com/thinkcmf/thinkcmf/releases/tag/5.0.190419" "3.升级到6.0 https://github.com/thinkcmf/thinkcmf/releases"},{"cms_list":[],"dangerous":"3","cms_name":"ThinkCMF","ps":"ThinkCMF templateFile远程代码执行漏洞","name":"ThinkCMF templateFile远程代码执行漏洞","determine":["simplewind/Core/ThinkPHP.php","index.php","data/conf/db.php","application/Admin/Controller/NavcatController.class.php","application/Comment/Controller/WidgetController.class.php"],"version":{"type":"file","file":"index.php","regular":"THINKCMF_VERSION.+(\d+.\d+.\d+)'","regular_len":0 ,"vul_version":"1.6.0~2.2.2","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"application/Comment/Controller/WidgetController.class.php","regular":'''protected function display('''}]},"repair":"修复建议:" "1.修改代码 https://gitee.com/thinkcmf/ThinkCMFX/commit/559b868283bc491cf858d2f85bcd5b6cfa425d63\n" "2.升级到最新版 https://gitee.com/thinkcmf/ThinkCMFX/releases/X2.2.4" "3.升级到ThinkCMF5.X 或者ThinkCMF6.X"},{"cms_list":[],"dangerous":"3","cms_name":"zfaka","ps":"zfaka存在SQL注入漏洞","name":"zfaka存在SQL注入漏洞","determine":["application/init.php","application/function/F_Network.php","application/controllers/Error.php","application/modules/Admin/controllers/Profiles.php"],"version":{"type":"file","file":"application/init.php","regular":"VERSION.+'(\d+.\d+.\d+)'","regular_len":0 ,"vul_version":"1.0.0~1.4.4","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"application/function/F_Network.php","regular":'''if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4'''}]},"repair":"修复建议:\nhttps://github.com/zlkbdotnet/zfaka/commit/f0f504528347a758fc34fb4b8dbc69377b099b8e?branch=f0f504528347a758fc34fb4b8dbc69377b099b8e&diff=split\n 或者升级到1.4.5"},{"cms_list":[],"dangerous":"3","cms_name":"dedecms","ps":"dedecms 20210719安全更新","name":"dedecms 20210719安全更新","determine":["data/admin/ver.txt","data/common.inc.php","dede/shops_operations_userinfo.php","member/edit_space_info.php"],"version":{"type":"file","file":"data/admin/ver.txt","regular":"(\d+)","regular_len":0 ,"vul_version":["20180109"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"include/dedemodule.class.php","regular":'''if(preg_match("#[^a-z]+(eval|assert)[\s]*[(]#i"'''}]},"repair":"修复建议:https://www.dedecms.com/package.html?t=1626652800\n 也可以在后台进行更新"},{"cms_list":[],"dangerous":"3","cms_name":"dedecms","ps":"dedecms 20220125安全更新","name":"dedecms 20220125安全更新","determine":["data/admin/ver.txt","data/common.inc.php","dede/shops_operations_userinfo.php","member/edit_space_info.php"],"version":{"type":"file","file":"data/admin/ver.txt","regular":"(\d+)","regular_len":0 ,"vul_version":["20180109","20220325","20210201","20210806"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"include/downmix.inc.php","regular":'''上海卓卓网络科技有限公司'''}]},"repair":"修复建议:https://www.dedecms.com/package.html?t=1643068800\n 也可以在后台进行更新"},{"cms_list":[],"dangerous":"3","cms_name":"dedecms","ps":"dedecms 20220218安全更新","name":"dedecms 20220218安全更新","determine":["data/admin/ver.txt","data/common.inc.php","dede/shops_operations_userinfo.php","member/edit_space_info.php"],"version":{"type":"file","file":"data/admin/ver.txt","regular":"(\d+)","regular_len":0 ,"vul_version":["20180109","20220325","20210201","20210806"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"dede/file_manage_control.php","regular":'''phpinfo,eval,assert,exec,passthru,shell_exec,system,proc_open,popen'''}]},"repair":"修复建议:https://www.dedecms.com/package.html?t=1645142400\n 也可以在后台进行更新"},{"cms_list":[],"dangerous":"3","cms_name":"dedecms","ps":"dedecms 20220310安全更新","name":"dedecms 20220310安全更新","determine":["data/admin/ver.txt","data/common.inc.php","dede/shops_operations_userinfo.php","member/edit_space_info.php"],"version":{"type":"file","file":"data/admin/ver.txt","regular":"(\d+)","regular_len":0 ,"vul_version":["20180109","20220325","20210201","20210806"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"dede/file_manage_control.php","regular":'''phpinfo,eval,assert,exec,passthru,shell_exec,system,proc_open,popen'''}]},"repair":"修复建议:https://www.dedecms.com/package.html?t=1646870400\n 也可以在后台进行更新"},{"cms_list":[],"dangerous":"3","cms_name":"dedecms","ps":"dedecms 20220325安全更新","name":"dedecms 20220325安全更新","determine":["data/admin/ver.txt","data/common.inc.php","dede/shops_operations_userinfo.php","member/edit_space_info.php"],"version":{"type":"file","file":"data/admin/ver.txt","regular":"(\d+)","regular_len":0 ,"vul_version":["20180109","20220325","20210201","20210806"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"plus/mytag_js.php","regular":'''phpinfo,eval,assert,exec,passthru,shell_exec,system,proc_open,popen'''}]},"repair":"修复建议:https://www.dedecms.com/package.html?t=1648166400\n 也可以在后台进行更新"},{"cms_list":[],"dangerous":"2","cms_name":"dedecms","ps":"dedecms 已开启会员注册功能","name":"dedecms 已开启会员注册功能","determine":["data/admin/ver.txt","data/common.inc.php","dede/shops_operations_userinfo.php","member/edit_space_info.php"],"version":{"type":"file","file":"data/admin/ver.txt","regular":"(\d+)","regular_len":0 ,"vul_version":["20180109","20220325","20210201","20210806"],"ver_type":"list"},"repair_file":{"type":"phpshell","file":[{"file":"member/get_user_cfg_mb_open.php","phptext":'''<?php require_once(dirname(__FILE__).'/../include/common.inc.php');echo 'start'.$cfg_mb_open.'end';?>''',"regular":'''start(\w)end''',"reulst_type":"str","result":"startYend"}]},"repair":"修复建议:建议在后台关闭会员注册功能"},{"cms_list":[],"dangerous":"3","cms_name":"MetInfo","ps":"MetInfo 7.5.0存在SQL注入漏洞","name":"MetInfo7.5.0存在SQL注入漏洞","determine":["cache/config/config_metinfo.php","app/system/entrance.php","app/system/databack/admin/index.class.php","cache/config/app_config_metinfo.php"],"version":{"type":"file","file":"cache/config/config_metinfo.php","regular":"value.+'(\d+.\d+.\d+)'","vul_version":"7.5.0~7.5.0","ver_type":"range"},"repair_file":{"type":"version","file":[]},"repair":"漏洞参考:https://www.metinfo.cn/log/ 建议升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"MetInfo","ps":"MetInfo 7.3.0存在SQL注入漏洞、XSS漏洞","name":"MetInfo 7.3.0存在SQL注入漏洞、XSS漏洞","determine":["app/system/entrance.php","app/system/admin/admin/index.class.php","app/system/admin/admin/templates/admin_add.php"],"version":{"type":"file","file":"app/system/entrance.php","regular":"SYS_VER.+'(\d+.\d+.\d+)'","vul_version":"7.3.0~7.3.0","ver_type":"range"},"repair_file":{"type":"version","file":[]},"repair":"漏洞参考:https://www.metinfo.cn/log/ 建议升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"MetInfo","ps":"MetInfo 7.2.0存在SQL注入漏洞、XSS漏洞","name":"MetInfo 7.2.0存在SQL注入漏洞、XSS漏洞","determine":["app/system/entrance.php","app/system/admin/admin/index.class.php","app/system/admin/admin/templates/admin_add.php"],"version":{"type":"file","file":"app/system/entrance.php","regular":"SYS_VER.+'(\d+.\d+.\d+)'","vul_version":"7.2.0~7.2.0","ver_type":"range"},"repair_file":{"type":"version","file":[]},"repair":"漏洞参考:https://www.metinfo.cn/log/ 建议升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"MetInfo","ps":"MetInfo 7.1.0存在文件上传漏洞、SQL注入漏洞、XSS漏洞","name":"MetInfo 7.1.0存在文件上传漏洞、SQL注入漏洞、XSS漏洞","determine":["app/system/entrance.php","app/system/admin/admin/index.class.php","app/system/admin/admin/templates/admin_add.php"],"version":{"type":"file","file":"app/system/entrance.php","regular":"SYS_VER.+'(\d+.\d+.\d+)'","vul_version":"7.1.0~7.1.0","ver_type":"range"},"repair_file":{"type":"version","file":[]},"repair":"漏洞参考:https://www.metinfo.cn/log/ 建议升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"MetInfo","ps":"MetInfo 7.0.0 存在SQL注入漏洞","name":"MetInfo7.0.0存在SQL注入漏洞","determine":["app/system/entrance.php","app/system/admin/admin/index.class.php","app/system/admin/admin/templates/admin_add.php"],"version":{"type":"file","file":"app/system/entrance.php","regular":"SYS_VER.+'(\d+.\d+.\d+)'","vul_version":"7.0.0~7.0.0","ver_type":"range"},"repair_file":{"type":"version","file":[]},"repair":"漏洞参考:https://www.metinfo.cn/log/ 建议升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"MetInfo","ps":"MetInfo 6.1.2存在SQL注入漏洞","name":"MetInfo 6.1.2存在SQL注入漏洞","determine":["app/system/entrance.php","app/system/admin/admin/templates/admin_add.php"],"version":{"type":"file","file":"app/system/entrance.php","regular":"SYS_VER.+'(\d+.\d+.\d+)'","vul_version":"6.1.2~6.1.2","ver_type":"range"},"repair_file":{"type":"version","file":[]},"repair":"漏洞参考:https://www.metinfo.cn/log/ 建议升级到最新版"},{"cms_list":[],"dangerous":"3","cms_name":"MetInfo","ps":"MetInfo 6.1.1 存在已知后台权限可以获取webshell漏洞","name":"MetInfo 6.1.1 存在已知后台权限可以获取webshell漏洞","determine":["app/system/entrance.php","app/system/admin/admin/templates/admin_add.php"],"version":{"type":"file","file":"app/system/entrance.php","regular":"SYS_VER.+'(\d+.\d+.\d+)'","vul_version":"6.1.1~6.1.1","ver_type":"range"},"repair_file":{"type":"version","file":[]},"repair":"漏洞参考:https://www.metinfo.cn/log/ 建议升级到最新版"},{"cms_list":[],"dangerous":"2","cms_name":"emlog","ps":"emlog版本太低建议升级到Pro版本","name":"emlog版本太低建议升级到Pro版本","determine":["include/lib/option.php","admin/views/template_install.php","include/lib/checkcode.php","include/controller/author_controller.php"],"version":{"type":"file","file":"include/lib/option.php","regular":"EMLOG_VERSION.+'(\d+.\d+.\d+)'","vul_version":"5.3.1~6.0.0","ver_type":"range"},"repair_file":{"type":"version","file":[]},"repair":"漏洞参考:https://www.emlog.net/docs/#/531toPro"},{"cms_list":[],"dangerous":"1","cms_name":"帝国CMS","ps":"EmpireCMs7.0后台XSS漏洞","name":"EmpireCMs7.0后台XSS漏洞","determine":["e/class/EmpireCMS_version.php","e/search/index.php","e/member/EditInfo/index.php","e/ViewImg/index.html"],"version":{"type":"file","file":"e/class/EmpireCMS_version.php","regular":"EmpireCMS_VERSION.+'(\d+.\d+)'","vul_version":"7.0~7.0","ver_type":"range"},"repair_file":{"type":"version","file":[]},"repair":"漏洞参考:/e/admin/openpage/AdminPage.php?ehash_f9Tj7=ZMhwowHjtSwqyRuiOylK&mainfile=javascript:alert(1)"},{"cms_list":[],"dangerous":"2","cms_name":"帝国CMS","ps":"EmpireCMs6.0~7.5 后台代码执行","name":"EmpireCMs6.0~7.5 后台代码执行","determine":["e/class/EmpireCMS_version.php","e/search/index.php","e/member/EditInfo/index.php","e/ViewImg/index.html"],"version":{"type":"file","file":"e/class/EmpireCMS_version.php","regular":"EmpireCMS_VERSION.+'(\d+.\d+)'","vul_version":"6.0~7.5","ver_type":"range"},"repair_file":{"type":"version","file":[]},"repair":"漏洞参考:https://blog.csdn.net/ws13129/article/details/90071260 官方暂未有修复方案"},{"cms_list":[],"dangerous":"2","cms_name":"帝国CMS","ps":"EmpireCMs6.0~7.5 后台导入模型代码执行","name":"EmpireCMs6.0~7.5 后台导入模型代码执行","determine":["e/class/EmpireCMS_version.php","e/search/index.php","e/member/EditInfo/index.php","e/ViewImg/index.html"],"version":{"type":"file","file":"e/class/EmpireCMS_version.php","regular":"EmpireCMS_VERSION.+'(\d+.\d+)'","vul_version":"6.0~7.5","ver_type":"range"},"repair_file":{"type":"version","file":[]},"repair":"漏洞参考:https://blog.csdn.net/ws13129/article/details/90071260 官方暂未有修复方案"},{"cms_list":[],"dangerous":"2","cms_name":"discuz","ps":"Discuz utility组件对外访问","name":"Discuz utility组件对外访问","determine":["uc_client/client.php","uc_server/lib/uccode.class.php","uc_server/model/version.php","source/discuz_version.php"],"version":{"type":"single_file","file":"utility/convert/index.php","regular":"DISCUZ_RELEASE.+'(\d+)'","regular_len":0 ,"vul_version":["1"],"ver_type":"list"},"repair_file":{"type":"single_file","file":[{"file":"utility/convert/index.php","regular":'''$source = getgpc('source') ? getgpc('source') : getgpc('s');'''}]},"repair":"修复漏洞参考删除utility目录"},{"cms_list":[],"dangerous":"2","cms_name":"discuz","ps":"Discuz邮件认证入口CSRF以及时间限制可绕过漏洞","name":"Discuz邮件认证入口CSRF以及时间限制可绕过漏洞","determine":["uc_client/client.php","uc_server/lib/uccode.class.php","uc_server/model/version.php","source/discuz_version.php"],"version":{"type":"file","file":"source/discuz_version.php","regular":"DISCUZ_RELEASE.+'(\d+)'","regular_len":0 ,"vul_version":["20210816","20210630","20210520","20210320","20210119","20200818","20191201","20190917"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"source/admincp/admincp_setting.php","regular":'''showsetting('setting_permissions_mailinterval', 'settingnew[mailinterval]', $setting['mailinterval'], 'text');'''}]},"repair":"修复漏洞参考https://gitee.com/Discuz/DiscuzX/pulls/1276/commits"},{"cms_list":[],"dangerous":"3","cms_name":"discuz","ps":"Discuz 报错注入SQL","name":"Discuz 报错注入SQL","determine":["uc_client/client.php","uc_server/lib/uccode.class.php","uc_server/model/version.php","source/discuz_version.php"],"version":{"type":"file","file":"source/discuz_version.php","regular":"DISCUZ_RELEASE.+'(\d+)'","regular_len":0 ,"vul_version":["20211124","20211022","20210926","20210917","20210816","20210630","20210520","20210320","20210119","20200818","20191201","20190917"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"api/uc.php","regular":'''if($len > 22 || $len < 3 || preg_match("/\s+|^c:\\con\\con|[%,\*\"\s\<\>\&\(\)']/is", $get['newusername']))'''}]},"repair":"修复漏洞参考https://gitee.com/Discuz/DiscuzX/pulls/1349"},{"cms_list":[],"dangerous":"3","cms_name":"discuz","ps":"Discuz备份恢复功能执行任意SQL漏洞","name":"Discuz备份恢复功能执行任意SQL漏洞","determine":["uc_client/client.php","uc_server/lib/uccode.class.php","uc_server/model/version.php","source/discuz_version.php"],"version":{"type":"file","file":"source/discuz_version.php","regular":"DISCUZ_RELEASE.+'(\d+)'","regular_len":0 ,"vul_version":["20211231","20211124","20211022","20210926","20210917","20210816","20210630","20210520","20210320","20210119","20200818","20191201","20190917"],"ver_type":"list"},"repair_file":{"type":"file","file":[{"file":"api/db/dbbak.php","regular":'''if(!preg_match('/^backup_(\d+)_\w+$/', $get['sqlpath']) || !preg_match('/^\d+_\w+\-(\d+).sql$/', $get['dumpfile']))'''}]},"repair":"修复漏洞参考https://gitee.com/Discuz/DiscuzX/releases/v3.4-20220131"},{"cms_list":["maccms10"],"dangerous":"4","cms_name":"Thinkphp","ps":"thinkphp5.0.X漏洞","name":"Thinkphp5.X代码执行","determine":["thinkphp/base.php","thinkphp/library/think/App.php","thinkphp/library/think/Request.php"],"version":{"type":"file","file":"thinkphp/base.php","regular":"THINK_VERSION.+(\d+.\d+.\d+)","vul_version":"5.0.0~5.0.24","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"thinkphp/library/think/App.php","regular":'''(!preg_match('/^[A-Za-z](\w|\.)*$/'''},{"file":"thinkphp/library/think/Request.php","regular":'''if (in_array($method, ['GET', 'POST', 'DELETE', 'PUT', 'PATCH']))'''}]},"repair":"修复漏洞参考https://www.thinkphp.cn/topic/60693.html\n修复漏洞参考https://www.thinkphp.cn/topic/60693.html"},{"cms_list":["maccms10"],"dangerous":"3","cms_name":"Thinkphp","ps":"Thinkphp5.0.15 SQL注入漏洞","name":"Thinkphp5.0.15 SQL注入漏洞","determine":["thinkphp/base.php","thinkphp/library/think/App.php","thinkphp/library/think/Request.php"],"version":{"type":"file","file":"thinkphp/base.php","regular":"THINK_VERSION.+(\d+.\d+.\d+)","vul_version":"5.0.13~5.0.15","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"thinkphp/library/think/db/Builder.php","regular":'''if ($key == $val[1]) {
                        $result[$item] = $this->parseKey($val[1]) . '+' . floatval($val[2]);
                    }'''}]},"repair":"修复漏洞https://github.com/top-think/framework/commit/363fd4d90312f2cfa427535b7ea01a097ca8db1b"},{"cms_list":["maccms10"],"dangerous":"3","cms_name":"Thinkphp","ps":"Thinkphp5.0.10 SQL注入漏洞","name":"Thinkphp5.0.10 SQL注入漏洞","determine":["thinkphp/base.php","thinkphp/library/think/App.php","thinkphp/library/think/Request.php"],"version":{"type":"file","file":"thinkphp/base.php","regular":"THINK_VERSION.+(\d+.\d+.\d+)","vul_version":"5.0.10~5.0.10","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"thinkphp/library/think/Request.php","regular":'''preg_match('/^(EXP|NEQ|GT|EGT|LT|ELT|OR|XOR|LIKE|NOTLIKE|NOT LIKE|NOT BETWEEN|NOTBETWEEN|BETWEEN|NOTIN|NOT IN|IN)$/i'''}]},"repair":"修复漏洞https://github.com/top-think/framework/commit/495020b7b0c16de40f20b08f2ab3be0a2b816b96"},{"cms_list":["maccms10"],"dangerous":"3","cms_name":"Thinkphp","ps":"Thinkphp5.0.0 到 Thinkphp5.0.21 SQL注入漏洞","name":"Thinkphp5.0.21 SQL注入漏洞","determine":["thinkphp/base.php","thinkphp/library/think/App.php","thinkphp/library/think/Request.php"],"version":{"type":"file","file":"thinkphp/base.php","regular":"THINK_VERSION.+(\d+.\d+.\d+)","vul_version":"5.0.0~5.0.21","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"thinkphp/library/think/db/builder/Mysql.php","regular":'''if ($strict && !preg_match('/^[\w\.\*]+$/', $key))'''}]},"repair":"修复漏洞https://github.com/top-think/framework/commit/8652c83ea10661483217c4088b582b9f05b90c20#diff-680218f330b44eb8db590f77c9307503cd312225c5ada4dbff65b9af382498bb"},{"cms_list":["maccms10"],"dangerous":"3","cms_name":"Thinkphp","ps":"Thinkphp5.0.18文件包含漏洞","name":"Thinkphp5.0.18文件包含漏洞","determine":["thinkphp/base.php","thinkphp/library/think/App.php","thinkphp/library/think/Request.php"],"version":{"type":"file","file":"thinkphp/base.php","regular":"THINK_VERSION.+(\d+.\d+.\d+)","vul_version":"5.0.0~5.0.18","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"thinkphp/library/think/template/driver/File.php","regular":'''$this->cacheFile = $cacheFile;'''}]},"repair":"修复漏洞https://github.com/top-think/framework/commit/e255100c7f162c48a22f1c2bf0890469f54f061b#diff-89dd11f3d7c96572fd8218c6566241bb206b77d17220fa569a35d45cda7b5f59"},{"cms_list":["maccms10"],"dangerous":"4","cms_name":"Thinkphp","ps":"Thinkphp5.0.10远程代码执行","name":"Thinkphp5.0.10远程代码执行","determine":["thinkphp/base.php","thinkphp/library/think/App.php","thinkphp/library/think/Request.php"],"version":{"type":"file","file":"thinkphp/base.php","regular":"THINK_VERSION.+(\d+.\d+.\d+)","vul_version":"5.0.0~5.0.10","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"thinkphp/library/think/App.php","regular":'''$data   = "<?php\n//" . sprintf('%012d', $expire) . "\n exit();?>;'''}]},"repair":"修复漏洞参考https://github.com/top-think/framework/commit/a217d88e38a0ec2dd33ba9d5fd53ac509f93c91a#diff-c945c42842520443a3b7bdd49df3a6ca5df44a07e9a957d85ca1475ea74f8564"},{"cms_list":[],"dangerous":"3","cms_name":"Wordpress","ps":"CVE-2022–21661 Wordpress SQL注入","name":"CVE-2022–21661 Wordpress SQL注入","determine":["wp-includes/version.php","wp-settings.php","wp-comments-post.php","wp-includes/class-wp-hook.php"],"version":{"type":"file","file":"wp-includes/version.php","regular":"wp_version.+(\d+.\d+.\d+)","vul_version":"4.1.0~5.8.2","ver_type":"range"},"repair_file":{"type":"file","file":[{"file":"wp-includes/class-wp-tax-query.php","regular":'''if ( 'slug' === $query['field'] || 'name' === $query['field'] )'''}]},"repair":"修复漏洞参考https://wordpress.org/news/2022/01/wordpress-5-8-3-security-release"}]#line:728
        return OOOO0000O00OO00OO #line:729
    def getCmsType (OOO0OO0OO0OO00O00 ,OO000OO00O0O0OO00 ,O0O000O000O0O0OOO ):#line:731
        ""#line:737
        for O00O000O0OO00OO0O in O0O000O000O0O0OOO ['determine']:#line:739
            OO000000OOOO000O0 =OO000OO00O0O0OO00 ['path']+'/'+O00O000O0OO00OO0O #line:740
            if not os .path .exists (OO000000OOOO000O0 ):#line:741
                return False #line:742
        if 'cms_name'in OO000OO00O0O0OO00 :#line:745
            if OO000OO00O0O0OO00 ['cms_name']!=O0O000O000O0O0OOO ['cms_name']:#line:746
                if not O0O000O000O0O0OOO ['cms_name']in O0O000O000O0O0OOO ['cms_list']:return False #line:747
        OO0000000000O0O0O =OOO0OO0OO0OO00O00 .getCmsVersion (OO000OO00O0O0OO00 ,O0O000O000O0O0OOO )#line:749
        if not OO0000000000O0O0O :return False #line:750
        OO000OO00O0O0OO00 ['version_info']=OO0000000000O0O0O #line:751
        if not OOO0OO0OO0OO00O00 .getVersionInfo (OO0000000000O0O0O ,O0O000O000O0O0OOO ['version']):return False #line:753
        OO000OO00O0O0OO00 ['cms_name']=O0O000O000O0O0OOO ['cms_name']#line:754
        OO00O00O0O0000000 =OOO0OO0OO0OO00O00 .getCmsVersionVulFix (OO000OO00O0O0OO00 ,O0O000O000O0O0OOO )#line:756
        if not OO00O00O0O0000000 :return False #line:757
        OO000OO00O0O0OO00 ['is_vufix']=True #line:758
        return True #line:759
    def getVersionInfo (O00O0OO0OO0OO0OO0 ,OO0OOO00O0O0000OO ,OOO0O0OOOOOOO0O0O ):#line:761
        ""#line:767
        if OOO0O0OOOOOOO0O0O ['ver_type']=='range':#line:768
            try :#line:769
                OOO0O0OOOOOOO0O0O =OOO0O0OOOOOOO0O0O ['vul_version']#line:770
                OO0OO000O0O00O000 ,O0O00O000OO0O0O0O =OOO0O0OOOOOOO0O0O .split ('~')#line:771
                if OO0OOO00O0O0000OO .split ('.')[0 ]>=OO0OO000O0O00O000 .split ('.')[0 ]and OO0OOO00O0O0000OO .split ('.')[0 ]<=O0O00O000OO0O0O0O .split ('.')[0 ]:#line:772
                    OO0OO000O0O00O000 =''.join (OO0OO000O0O00O000 .split ('.'))#line:773
                    O0O00O000OO0O0O0O =''.join (O0O00O000OO0O0O0O .split ('.'))#line:774
                    OO0OOO00O0O0000OO =''.join (OO0OOO00O0O0000OO .split ('.'))#line:775
                    if OO0OOO00O0O0000OO >=OO0OO000O0O00O000 and OO0OOO00O0O0000OO <=O0O00O000OO0O0O0O :#line:776
                        return True #line:777
                return False #line:778
            except :#line:779
                return False #line:780
        elif OOO0O0OOOOOOO0O0O ['ver_type']=='list':#line:781
            if OO0OOO00O0O0000OO in OOO0O0OOOOOOO0O0O ['vul_version']:#line:782
                return True #line:783
            return False #line:784
    def getCmsVersion (OOO0OO0O0OO0OO0OO ,O0OOOO0O0000O0000 ,OOOO000000O0000O0 ):#line:786
        ""#line:791
        try :#line:792
            OOOO000000OO0OO00 =OOOO000000O0000O0 ["version"]#line:793
            if 'regular_len'in OOOO000000OO0OO00 :#line:794
                O0OOOO0O0O0OOO000 =OOOO000000OO0OO00 ['regular_len']#line:795
            else :#line:796
                O0OOOO0O0O0OOO000 =0 #line:797
            if OOOO000000OO0OO00 ['type']=='file':#line:798
                OOO0000000OO0O0OO =O0OOOO0O0000O0000 ['path']+'/'+OOOO000000OO0OO00 ['file']#line:799
                if os .path .exists (OOO0000000OO0O0OO ):#line:801
                    O00O0OO0O0OOO00OO =public .ReadFile (OOO0000000OO0O0OO )#line:802
                    if O00O0OO0O0OOO00OO and re .search (OOOO000000OO0OO00 ['regular'],O00O0OO0O0OOO00OO ):#line:803
                        if not 'cms_name'in O0OOOO0O0000O0000 :#line:804
                            O0OOOO0O0000O0000 ['cms_name']=OOOO000000O0000O0 ['cms_name']#line:805
                        return re .findall (OOOO000000OO0OO00 ['regular'],O00O0OO0O0OOO00OO )[O0OOOO0O0O0OOO000 ]#line:806
            elif OOOO000000OO0OO00 ['type']=='single_file':#line:807
                return "1"#line:808
            elif OOOO000000OO0OO00 ["type"]=='is_file':#line:809
                OOO0000000OO0O0OO =O0OOOO0O0000O0000 ['path']+'/'+OOOO000000OO0OO00 ['file']#line:810
                if os .path .exists (OOO0000000OO0O0OO ):#line:811
                    return "1"#line:812
        except :return False #line:813
        return False #line:814
    def getCmsVersionVulFix (O00O0O0O00O0OO000 ,O00000O00OO000O00 ,O000OO0O0O000OO00 ):#line:816
        ""#line:821
        try :#line:822
            O0O0O0O000000O0O0 =O000OO0O0O000OO00 ['repair_file']#line:823
            if O0O0O0O000000O0O0 ['type']=='file':#line:824
                for OO0O0O0OO0000OOOO in O0O0O0O000000O0O0 ['file']:#line:825
                    OOO000OOO0000O000 =O00000O00OO000O00 ['path']+'/'+OO0O0O0OO0000OOOO ['file']#line:826
                    if os .path .exists (OOO000OOO0000O000 ):#line:827
                        O00OO0000OO00000O =public .ReadFile (OOO000OOO0000O000 )#line:828
                        if not OO0O0O0OO0000OOOO ['regular']in O00OO0000OO00000O :#line:829
                            return True #line:830
            elif O0O0O0O000000O0O0 ['type']=='single_file':#line:831
                for OO0O0O0OO0000OOOO in O0O0O0O000000O0O0 ['file']:#line:832
                    OOO000OOO0000O000 =O00000O00OO000O00 ['path']+'/'+OO0O0O0OO0000OOOO ['file']#line:833
                    if os .path .exists (OOO000OOO0000O000 ):#line:834
                        O00OO0000OO00000O =public .ReadFile (OOO000OOO0000O000 )#line:835
                        if OO0O0O0OO0000OOOO ['regular']in O00OO0000OO00000O :#line:836
                            return True #line:837
            elif O0O0O0O000000O0O0 ['type']=='version':#line:838
                return True #line:839
            elif O0O0O0O000000O0O0 ['type']=='is_file':#line:840
                for OO0O0O0OO0000OOOO in O0O0O0O000000O0O0 ['file']:#line:841
                    OOO000OOO0000O000 =O00000O00OO000O00 ['path']+'/'+OO0O0O0OO0000OOOO ['file']#line:842
                    if os .path .exists (OOO000OOO0000O000 ):#line:843
                        return True #line:844
            elif O0O0O0O000000O0O0 ['type']=='phpshell':#line:845
                for OO0O0O0OO0000OOOO in O0O0O0O000000O0O0 ['file']:#line:846
                    try :#line:847
                        OOO000OOO0000O000 =O00000O00OO000O00 ['path']+'/'+OO0O0O0OO0000OOOO ['file']#line:848
                        public .WriteFile (OOO000OOO0000O000 ,OO0O0O0OO0000OOOO ['phptext'])#line:849
                        O0O00OO000O000OO0 =os .path .dirname (OOO000OOO0000O000 )#line:850
                        O0OOO0O0O00O0O000 =os .path .basename (OOO000OOO0000O000 )#line:851
                        O0000OO00O0OO0OO0 =public .ExecShell ("cd %s && php %s"%(O0O00OO000O000OO0 ,O0OOO0O0O00O0O000 ))#line:852
                        if len (O0000OO00O0OO0OO0 )<=0 :return False #line:853
                        if OO0O0O0OO0000OOOO ['result']in O0000OO00O0OO0OO0 [0 ]:#line:854
                            os .remove (OOO000OOO0000O000 )#line:855
                            return True #line:856
                        else :#line:857
                            os .remove (OOO000OOO0000O000 )#line:858
                    except :#line:859
                        continue #line:860
            return False #line:861
        except :#line:862
            return False #line:863
    def getWebInfo (OOO00000OO0O00000 ,OO0O0000OO00OOO0O ):#line:866
        ""#line:871
        return public .M ('sites').where ('project_type=?',('PHP')).select ()#line:872
    def startScan (O0O0O00O000000OOO ,OO0O00O00O00O0000 ):#line:875
        ""#line:880
        OO00O00000000OO00 =O0O0O00O000000OOO .__OO00OO00O00000OOO ()#line:881
        O000OO00000O0OO00 =int (time .time ())#line:882
        OO000OOO00O0O000O =O0O0O00O000000OOO .getWebInfo (None )#line:883
        OOOOO000O000O0O0O =O0O0O00O000000OOO .get_config ()#line:884
        OOOOO000O000O0OOO =[]#line:885
        for OO00O00000O00000O in OO000OOO00O0O000O :#line:886
            for OOO0OOO0OOO00O0OO in OOOOO000O000O0O0O :#line:887
                O00O00OOO0O0O000O =OOO0OOO0OOO00O0OO #line:888
                if 'cms_name'in OO00O00000O00000O :#line:889
                    if OO00O00000O00000O ['cms_name']!=OOO0OOO0OOO00O0OO ['cms_name']:#line:890
                        if not OO00O00000O00000O ['cms_name']in OOO0OOO0OOO00O0OO ['cms_list']:continue #line:891
                if O0O0O00O000000OOO .getCmsType (OO00O00000O00000O ,O00O00OOO0O0O000O ):#line:892
                    if not 'cms'in OO00O00000O00000O :#line:893
                        OO00O00000O00000O ['cms']=[]#line:894
                        OO00O00000O00000O ['cms'].append (OOO0OOO0OOO00O0OO )#line:895
                    else :#line:896
                        OO00O00000O00000O ['cms'].append (OOO0OOO0OOO00O0OO )#line:897
                else :#line:898
                    if not 'cms'in OO00O00000O00000O :#line:899
                        OO00O00000O00000O ['cms']=[]#line:900
            if not 'is_vufix'in OO00O00000O00000O :#line:901
                OO00O00000O00000O ['is_vufix']=False #line:902
        for OO000000O0OO0OOO0 in OO000OOO00O0O000O :#line:903
            if OO000000O0OO0OOO0 ['is_vufix']:#line:904
                OOOOO000O000O0OOO .append (OO000000O0OO0OOO0 )#line:905
        cache .set ("scaing_info",OOOOO000O000O0OOO ,1600 )#line:906
        cache .set ("scaing_info_time",O000OO00000O0OO00 ,1600 )#line:907
        O0O00OOO0O0O00OOO ={"info":OOOOO000O000O0OOO ,"time":O000OO00000O0OO00 ,"is_pay":OO00O00000000OO00 }#line:908
        return O0O00OOO0O0O00OOO #line:909
    def list (O0O0O000OOO0O000O ,OOOO0OO0O0OO00O0O ):#line:911
        ""#line:915
        OOOO00OO0O0OOOO00 =O0O0O000OOO0O000O .__OO00OO00O00000OOO ()#line:916
        if not cache .get ("scaing_info")or not cache .get ("scaing_info_time"):#line:917
            return O0O0O000OOO0O000O .startScan (None )#line:918
        OO0OOOO00OOO00O00 ={"info":cache .get ("scaing_info"),"time":cache .get ("scaing_info_time"),"is_pay":OOOO00OO0O0OOOO00 }#line:919
        return OO0OOOO00OOO00O00 #line:920
    def startAweb (OO0O00O0000O0000O ,O0O0OO000OOOO0O0O ):#line:922
        ""#line:925
        O0000O00OO0OO0OO0 =public .M ('sites').where ('project_type=? and name=?',('PHP',O0O0OO000OOOO0O0O .name )).count ()#line:926
        if not O0000O00OO0OO0OO0 :return public .returnMsg (False ,"当前网站不存在")#line:927
        return OO0O00O0000O0000O .startScan (None )#line:928
    def startScanWeb (O0000OO00000OO000 ,OO00O0000OO00OOO0 ):#line:931
        ""#line:936
        O000O0O0O0OO0O0O0 =public .M ('sites').where ('project_type=? and name=?',('PHP',OO00O0000OO00OOO0 .name )).count ()#line:937
        if not O000O0O0O0OO0O0O0 :return public .returnMsg (False ,"当前网站不存在")#line:938
        O000O0O0O0OO0O0O0 =public .M ('sites').where ('project_type=? and name=?',('PHP',OO00O0000OO00OOO0 .name )).select ()#line:939
        OOO000OOOOO0OO0O0 =O0000OO00000OO000 .get_config ()#line:940
        for O0OOO0OO0O00OOOO0 in O000O0O0O0OO0O0O0 :#line:941
            for O00OO0OO0O00OOOOO in OOO000OOOOO0OO0O0 :#line:942
                O0OOOOOOOO0OOO0O0 =O00OO0OO0O00OOOOO #line:943
                if O0000OO00000OO000 .getCmsType (O0OOO0OO0O00OOOO0 ,O0OOOOOOOO0OOO0O0 ):#line:944
                    if not 'cms'in O0OOO0OO0O00OOOO0 :#line:945
                        O0OOO0OO0O00OOOO0 ['cms']=[]#line:946
                        O0OOO0OO0O00OOOO0 ['cms'].append (O00OO0OO0O00OOOOO )#line:947
                    else :#line:948
                        O0OOO0OO0O00OOOO0 ['cms'].append (O00OO0OO0O00OOOOO )#line:949
                else :#line:951
                    if not 'cms'in O0OOO0OO0O00OOOO0 :#line:952
                        O0OOO0OO0O00OOOO0 ['cms']=[]#line:953
            if not 'is_vufix'in O0OOO0OO0O00OOOO0 :#line:954
                O0OOO0OO0O00OOOO0 ['is_vufix']=False #line:955
        return public .returnMsg (True ,O000O0O0O0OO0O0O0 )#line:956
    def startPath (O000O0O00OOOO0OOO ,O00OOOOOOOO000O0O ):#line:958
        ""#line:963
        O00O00O0O0OOOOOOO =O00OOOOOOOO000O0O .path .strip ()#line:964
        if not os .path .exists (O00O00O0O0OOOOOOO ):return public .returnMsg (False ,"目录不存在")#line:965
        O0OO0000O0O00OOOO =O000O0O00OOOO0OOO .get_config ()#line:966
        OO0OOOO00O000O0OO =[{"path":O00O00O0O0OOOOOOO ,"name":O00O00O0O0OOOOOOO }]#line:967
        for O0O0O0O000OOO0O0O in OO0OOOO00O000O0OO :#line:968
            for O000OOOO0OO0OO00O in O0OO0000O0O00OOOO :#line:969
                OO0OO0OO0O0OOOO0O =O000OOOO0OO0OO00O #line:970
                if O000O0O00OOOO0OOO .getCmsType (O0O0O0O000OOO0O0O ,OO0OO0OO0O0OOOO0O ):#line:971
                    if not 'cms'in O0O0O0O000OOO0O0O :#line:972
                        O0O0O0O000OOO0O0O ['cms']=[]#line:973
                        O0O0O0O000OOO0O0O ['cms'].append (O000OOOO0OO0OO00O )#line:974
                    else :#line:975
                        O0O0O0O000OOO0O0O ['cms'].append (O000OOOO0OO0OO00O )#line:976
                    break #line:977
                else :#line:978
                    if not 'cms'in O0O0O0O000OOO0O0O :#line:979
                        O0O0O0O000OOO0O0O ['cms']=[]#line:980
            if not 'is_vufix'in O0O0O0O000OOO0O0O :#line:981
                O0O0O0O000OOO0O0O ['is_vufix']=False #line:982
        return public .returnMsg (True ,OO0OOOO00O000O0OO )