File: /www/server/panel/BTPanel/static/js/index-legacy233.js
!function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,r){if(t){if("string"==typeof t)return e(t,r);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?e(t,r):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,o=Array(r);e<r;e++)o[e]=t[e];return o}function o(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,r,e="function"==typeof Symbol?Symbol:{},s=e.iterator||"@@iterator",a=e.toStringTag||"@@toStringTag";function i(e,o,s,a){var i=o&&o.prototype instanceof l?o:l,u=Object.create(i.prototype);return n(u,"_invoke",function(e,o,n){var s,a,i,l=0,u=n||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(r,e){return s=r,a=0,i=t,p.n=e,c}};function d(e,o){for(a=e,i=o,r=0;!f&&l&&!n&&r<u.length;r++){var n,s=u[r],d=p.p,y=s[2];e>3?(n=y===o)&&(i=s[(a=s[4])?5:(a=3,3)],s[4]=s[5]=t):s[0]<=d&&((n=e<2&&d<s[1])?(a=0,p.v=o,p.n=s[1]):d<y&&(n=e<3||s[0]>o||o>y)&&(s[4]=e,s[5]=o,p.n=y,a=0))}if(n||e>1)return c;throw f=!0,o}return function(n,u,y){if(l>1)throw TypeError("Generator is already running");for(f&&1===u&&d(u,y),a=u,i=y;(r=a<2?t:i)||!f;){s||(a?a<3?(a>1&&(p.n=-1),d(a,i)):p.n=i:p.v=i);try{if(l=2,s){if(a||(n="next"),r=s[n]){if(!(r=r.call(s,i)))throw TypeError("iterator result is not an object");if(!r.done)return r;i=r.value,a<2&&(a=0)}else 1===a&&(r=s.return)&&r.call(s),a<2&&(i=TypeError("The iterator does not provide a '"+n+"' method"),a=1);s=t}else if((r=(f=p.n<0)?i:e.call(o,p))!==c)break}catch(r){s=t,a=1,i=r}finally{l=1}}return{value:r,done:f}}}(e,s,a),!0),u}var c={};function l(){}function u(){}function f(){}r=Object.getPrototypeOf;var p=[][s]?r(r([][s]())):(n(r={},s,function(){return this}),r),d=f.prototype=l.prototype=Object.create(p);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,n(t,a,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=f,n(d,"constructor",f),n(f,"constructor",u),u.displayName="GeneratorFunction",n(f,a,"GeneratorFunction"),n(d),n(d,a,"Generator"),n(d,s,function(){return this}),n(d,"toString",function(){return"[object Generator]"}),(o=function(){return{w:i,m:y}})()}function n(t,r,e,o){var s=Object.defineProperty;try{s({},"",{})}catch(t){s=0}n=function(t,r,e,o){function a(r,e){n(t,r,function(t){return this._invoke(r,e,t)})}r?s?s(t,r,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[r]=e:(a("next",0),a("throw",1),a("return",2))},n(t,r,e,o)}function s(t,r,e,o,n,s,a){try{var i=t[s](a),c=i.value}catch(t){return void e(t)}i.done?r(c):Promise.resolve(c).then(o,n)}function a(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,o)}return e}function i(r,e,o){return(e=function(r){var e=function(r,e){if("object"!=t(r)||!r)return r;var o=r[Symbol.toPrimitive];if(void 0!==o){var n=o.call(r,e||"default");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"==t(e)?e:e+""}(e))in r?Object.defineProperty(r,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[e]=o,r}System.register(["./utils-lib-legacy.js?v=1777008528","./base-lib-legacy.js?v=1777008528","./firewall-legacy.js?v=1777008528","./__commonjsHelpers__-legacy.js?v=1777008528"],function(t,e){"use strict";var n,c,l,u,f,p,d,y,v,g,m,b,w,h,_,k,S,j,O,E,x,T,P,C,A,D,G,I,F;return{setters:[function(t){n=t.dD,c=t.R,l=t.d8,u=t.c7,f=t.a0,p=t.cZ},function(t){d=t.c,y=t.r,v=t.H,g=t.g,m=t.o,b=t.I,w=t.J,h=t.p,_=t.j,k=t.k,S=t.q,j=t.L,O=t.C,E=t.F,x=t.e,T=t.x,P=t.s,C=t.y,A=t.v,D=t.B,G=t.aX,I=t.z},function(t){F=t.aS},null],execute:function(){var e={id:"safeDetectList"},M={class:"progress-header"},H={class:"progress-header-cot"},N={key:0,class:"relative"},J={class:"absolute top-[1.6rem] left-[2.6rem] flex flex-col"},L={class:"progress-header-cot"},q={class:"scanning-progress-title"},z={class:"color-org"},B={class:"color-red"},R={class:"scanning-progress-cont"},U={class:"progress-header-cot"},X={class:"progress-cont-list"},Z=["onClick"],$={class:"progress_type"},K={class:"progress_status"},Q={key:0,class:"text-danger"},V={key:1,class:"text-warning"},W={key:1},Y={key:2,class:"text-secondary"},tt={key:0},rt={class:"progress_fold"},et={class:"progress_item_body"},ot={class:"info_cont"},nt={class:"info_cont_desc"},st=d({__name:"index",setup:function(t){var p=y(!1),d=[{color:"var(--el-color-text-tertiary)",text:"未安装"},{color:"var(--el-color-text-secondary)",text:"良好"},{color:"var(--el-color-warning",text:"警告"},{color:"red",text:"危险"}],st={system_account:"系统账户",sshd_service:"SSHD远程服务",file_mode:"重要文件权限及属性",software:"重点软件检测",other:"其他项目检测",backdoor:"后门检测",proc:"恶意进程",history:"历史命令",log:"日志排查",rootkit:"rootkit检测"},at=y({}),it=v(function(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?a(Object(e),!0).forEach(function(r){i(t,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):a(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}return t}({},{scanStatus:!1,isEnd:!1,error:0,warn:0,time:0,progress:0,progressColor:"var(--el-color-primary)",progressConfig:{system_account:[],sshd_service:[],file_mode:[],software:[],other:[],backdoor:[],proc:[],history:[],log:[],rootkit:[]},statusTotal:{},allArr:[],result:{},progressStatus:{},active:{system_account:!1,sshd_service:!1,file_mode:!1,software:!1,other:!1,backdoor:!1,proc:!1,history:!1,log:!1,rootkit:!1}})),ct=function(t){return t+" 分"},lt=null,ut=g(function(){return it.scanStatus&&!it.isEnd?"正在扫描":at.value.status?"上次检测时间 "+("刚刚"===n(at.value.msg.time)?"一分钟内":n(at.value.msg.time)):"当前未进行安全检测"}),ft=y(""),pt=y(""),dt=g(function(){return it.scanStatus&&!it.isEnd?"正在扫描-".concat(ft.value):it.isEnd?"检测时间:"+c(it.time/1e3,"yyyy-MM-dd"):at.value.status?"若长时间未检测,服务器可能存在安全风险,建议立即检测":"当前安全风险未知,请立即检测"}),yt=function(t,r){if(r.data){var e,o=JSON.parse(r.data.replace(/'/g,'"'));if(o.hasOwnProperty("callback"))null===(e=lt)||void 0===e||e.close(),it.scanStatus=!1,it.isEnd=!0,it.time=(new Date).getTime();else ft.value=o.name,pt.value=o.topic,it.progress=parseInt(o.progress),it.progressConfig[o.topic].push(o),it.statusTotal[o.topic]=vt(it.progressConfig[o.topic]),it.allArr.push(o),3===o.status?it.error++:2===o.status&&it.warn++,1!==o.status&&(it.progressColor="var(--el-color-warning)")}},vt=function(t){var r={};return t.forEach(function(t){r[t.status]?r[t.status]++:r[t.status]=1}),r},gt=function(){var t,r;if(it.scanStatus&&!it.isEnd||it.isEnd,it.scanStatus&&!it.isEnd)return null===(r=lt)||void 0===r||r.close(),void mt();it.isEnd&&mt(),it.scanStatus=!0,null===(t=lt=f({route:"/ws_project",onMessage:yt}))||void 0===t||t.send({mod_name:"safe_detect",def_name:"get_safe_scan",ws_callback:""})},mt=function(){it.scanStatus=!1,it.isEnd=!1,it.error=0,it.warn=0,it.time=0,it.progress=0,it.progressColor="var(--el-color-primary)",it.progressConfig={system_account:[],sshd_service:[],file_mode:[],software:[],other:[],backdoor:[],proc:[],history:[],log:[],rootkit:[]},it.statusTotal={},it.allArr=[],it.result={},it.progressStatus={},it.active={system_account:!1,sshd_service:!1,file_mode:!1,software:!1,other:!1,backdoor:!1,proc:!1,history:!1,log:!1,rootkit:!1}},bt=function(){var t,r=(t=o().m(function t(){var r;return o().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,F();case 1:r=t.v,at.value=r.data,t.n=3;break;case 2:t.p=2,t.v;case 3:return t.a(2)}},t,null,[[0,2]])}),function(){var r=this,e=arguments;return new Promise(function(o,n){var a=t.apply(r,e);function i(t){s(a,o,n,i,c,"next",t)}function c(t){s(a,o,n,i,c,"throw",t)}i(void 0)})});return function(){return r.apply(this,arguments)}}();return m(function(){bt()}),function(t,o){var n,s,a,i=l,c=G,f=I,y=u,v=b("bt-loading");return w((_(),k("div",e,[S("div",M,[S("div",H,[S("div",{class:j("progresscirclebar "+(h(at).status?"security ":"")+"text-["+(100===(null===(n=h(at).msg)||void 0===n?void 0:n.security_count)?" var(--el-color-primary) ":" var(--el-color-warning)")+"]")},[h(at).status?(_(),k(E,{key:1},[h(it).scanStatus&&!h(it).isEnd?(_(),k("div",N,[x(c,{class:"animate-spin",type:"circle",percentage:70,"show-text":!1,"stroke-width":4,"define-back-color":"var(--el-color-white)",color:h(it).warn||h(it).error?"var(--el-color-warning)":"var(--el-color-primary)",width:100},null,8,["color"]),S("div",J,[x(i,{class:"w-[full] px-[.4rem]",src:"/firewall/icon-safe-detect".concat(h(it).warn||h(it).error?"-org":"",".svg")},null,8,["src"]),o[0]||(o[0]=S("span",{class:"text-small font-bold py-[.4rem] leading-none"}," 安全检测 ",-1))])])):(_(),O(c,{key:1,type:"circle",percentage:null===(s=h(at).msg)||void 0===s?void 0:s.security_count,format:ct,color:100===(null===(a=h(at).msg)||void 0===a?void 0:a.security_count)?"var(--el-color-primary)":"var(--el-color-warning)",width:100},null,8,["percentage","color"]))],64)):(_(),O(i,{key:0,class:"w-[10rem]",src:"/firewall/icon-safe-detect.svg"}))],2)]),S("div",L,[S("div",q,[h(it).isEnd?(_(),k(E,{key:1},[o[5]||(o[5]=T(" 检测已完成 ",-1)),h(it).error>0||h(it).warn>0?(_(),k(E,{key:0},[o[4]||(o[4]=T(" ,一共发现 ",-1)),h(it).warn>0?(_(),k(E,{key:0},[S("span",z,P(h(it).warn),1),o[1]||(o[1]=T(" 项风险项 ",-1))],64)):C("",!0),h(it).error>0?(_(),k(E,{key:1},[o[2]||(o[2]=T(" (包含 ",-1)),S("span",B,P(h(it).error),1),o[3]||(o[3]=T(" 项危险项,请立即处理) ",-1))],64)):C("",!0)],64)):C("",!0)],64)):(_(),k(E,{key:0},[T(P(h(ut)),1)],64))]),h(it).scanStatus?(_(),O(c,{key:0,percentage:h(it).progress,color:h(it).warn||h(it).error?"var(--el-color-warning)":"var(--el-color-primary)","stroke-width":10},null,8,["percentage","color"])):C("",!0),S("div",R,P(h(dt)),1)]),S("div",U,[x(f,{type:h(it).scanStatus&&!h(it).isEnd?"warning":"primary",onClick:gt,plain:!(!h(it).scanStatus||h(it).isEnd)},{default:A(function(){return[T(P(h(it).scanStatus&&!h(it).isEnd?"取消扫描":h(it).isEnd?"重新检测":"立即检测"),1)]}),_:1},8,["type","plain"]),x(y,{class:"!absolute -bottom-[2.5rem] right-[1.4rem]",href:"https://www.bt.cn/bbs/thread-126643-1-1.html"},{default:A(function(){return r(o[6]||(o[6]=[T(" 需求反馈>> ",-1)]))}),_:1})])]),S("div",X,[(_(),k(E,null,D(st,function(t,r){return S("div",{key:r,class:j([r+"_item "+(h(it).active[r]?"active":""),"progress_item"])},[S("div",{class:"progress_item_header",onClick:function(t){return function(t){it.active[t]=!it.active[t]}(r)}},[S("div",$,[x(i,{class:"title-icon",src:"/firewall/icon-"+r+".svg"},null,8,["src"]),S("span",null,P(t),1)]),S("div",K,[h(it).statusTotal[r]?(_(),k(E,{key:0},[h(it).statusTotal[r][3]||h(it).statusTotal[r][2]?(_(),k(E,{key:0},[h(it).statusTotal[r][3]?(_(),k("span",Q," 发现"+P(h(it).statusTotal[r][3])+"项危险 ",1)):C("",!0),h(it).statusTotal[r][2]?(_(),k("span",V,P((h(it).statusTotal[r][3]?"":"发现")+h(it).statusTotal[r][2])+"项警告 ",1)):C("",!0)],64)):h(it).scanStatus&&h(pt)==r?(_(),k("span",W," 正在扫描... ")):(_(),k("span",Y,"无风险项"))],64)):(_(),k(E,{key:1},[h(it).scanStatus&&!h(it).statusTotal[r]?(_(),k("span",tt," 等待扫描 ")):C("",!0)],64))]),S("div",rt,[x(i,{src:"/firewall/arrow-down.svg"})])],8,Z),S("div",et,[h(it).progressConfig[r]&&h(it).progressConfig[r].length?(_(!0),k(E,{key:0},D(h(it).progressConfig[r],function(t,r){return _(),k("div",{key:r,class:j([t.info?"active":"","progress_item_info"])},[S("div",ot,[S("div",null,P(t.name.replace("分析网站","")),1),S("div",{class:j("text-["+d[t.status<0?0:t.status].color+"]")},P(d[t.status<0?0:t.status].text),3)]),S("div",nt,P(t.info||""),1)],2)}),128)):C("",!0)])],2)}),64))])])),[[v,h(p)]])}}});t("default",p(st,[["__scopeId","data-v-4feacef1"]]))}}})}();