← Back
Editing: index-legacy279.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(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return n};var e,n={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(t,r,e){t[r]=e.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(e){f=function(t,r,e){return t[r]=e}}function p(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,a=Object.create(o.prototype),i=new G(n||[]);return s(a,"_invoke",{value:L(t,e,i)}),a}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var d="suspendedStart",y="suspendedYield",v="executing",g="completed",m={};function w(){}function b(){}function _(){}var k={};f(k,c,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(N([])));E&&E!==o&&a.call(E,c)&&(k=E);var S=_.prototype=w.prototype=Object.create(k);function O(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function j(r,e){function n(o,s,i,c){var u=h(r[o],r,s);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==t(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,i,c)}),(function(t){n("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,c)}))}c(u.arg)}var o;s(this,"_invoke",{value:function(t,r){function a(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(a,a):a()}})}function L(t,r,n){var o=d;return function(a,s){if(o===v)throw Error("Generator is already running");if(o===g){if("throw"===a)throw s;return{value:e,done:!0}}for(n.method=a,n.arg=s;;){var i=n.delegate;if(i){var c=P(i,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var u=h(t,r,n);if("normal"===u.type){if(o=n.done?g:y,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=g,n.method="throw",n.arg=u.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var s=a.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function T(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function C(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function N(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,s=function t(){for(;++o<r.length;)if(a.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return s.next=s}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=_,s(S,"constructor",{value:_,configurable:!0}),s(_,"constructor",{value:b,configurable:!0}),b.displayName=f(_,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,f(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},n.awrap=function(t){return{__await:t}},O(j.prototype),f(j.prototype,u,(function(){return this})),n.AsyncIterator=j,n.async=function(t,r,e,o,a){void 0===a&&(a=Promise);var s=new j(p(t,r,e,o),a);return n.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},O(S),f(S,l,"Generator"),f(S,c,(function(){return this})),f(S,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=N,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return i.type="throw",i.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],i=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var c=a.call(s,"catchLoc"),u=a.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(s)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),C(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;C(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,a,s){try{var i=t[a](s),c=i.value}catch(t){return void e(t)}i.done?r(c):Promise.resolve(c).then(n,o)}function n(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function o(r,e,n){return(e=function(r){var e=function(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;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:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./firewall-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER"],(function(t,a){"use strict";var s,i,c,u,l,f,p,h,d,y,v,g,m,w,b,_,k,x,E,S,O,j,L,P,T,C,G,N,D,A;return{setters:[function(t){s=t.dG,i=t.R,c=t.at,u=t.d,l=t.c,f=t.ah,p=t.e},function(t){h=t.c,d=t.r,y=t.k,v=t.g,g=t.p,m=t.G,w=t.H,b=t.x,_=t.q,k=t.v,x=t.y,E=t.J,S=t.M,O=t.F,j=t.e,L=t.B,P=t.z,T=t.C,C=t.A,G=t.a_,N=t.b3,D=t.D},function(t){A=t.a1},null],execute:function(){var a={id:"safeDetectList"},F={class:"progress-header"},I={class:"progress-header-cot"},M={key:0,class:"relative"},H={class:"absolute top-[1.6rem] left-[2.6rem] flex flex-col"},J={class:"progress-header-cot"},Y={class:"scanning-progress-title"},q={class:"color-org"},z={class:"color-red"},B={class:"scanning-progress-cont"},R={class:"progress-header-cot"},K={class:"progress-cont-list"},Q=["onClick"],U={class:"progress_type"},V={class:"progress_status"},W={key:0,class:"text-danger"},X={key:1,class:"text-warning"},Z={key:1},$={key:2,class:"text-[#666]"},tt={key:0},rt={class:"progress_fold"},et={class:"progress_item_body"},nt={class:"info_cont"},ot={class:"info_cont_desc"},at=h({__name:"index",setup:function(t){var p=d(!1),h=[{color:"#888",text:"未安装"},{color:"#666",text:"良好"},{color:"#e6a23c",text:"警告"},{color:"red",text:"危险"}],at={system_account:"系统账户",sshd_service:"SSHD远程服务",file_mode:"重要文件权限及属性",software:"重点软件检测",other:"其他项目检测",backdoor:"后门检测",proc:"恶意进程",history:"历史命令",log:"日志排查",rootkit:"rootkit检测"},st=d({}),it=y(function(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?n(Object(e),!0).forEach((function(r){o(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):n(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:"#20a53a",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+" 分"},ut=null,lt=v((function(){return it.scanStatus&&!it.isEnd?"正在扫描":st.value.status?"上次检测时间 "+("刚刚"===s(st.value.msg.time)?"一分钟内":s(st.value.msg.time)):"当前未进行安全检测"})),ft=d(""),pt=d(""),ht=v((function(){return it.scanStatus&&!it.isEnd?"正在扫描-".concat(ft.value):it.isEnd?"检测时间:"+i(it.time/1e3,"yyyy-MM-dd"):st.value.status?"若长时间未检测,服务器可能存在安全风险,建议立即检测":"当前安全风险未知,请立即检测"})),dt=function(t,r){if(r.data){var e,n=JSON.parse(r.data.replace(/'/g,'"'));if(n.hasOwnProperty("callback"))null===(e=ut)||void 0===e||e.close(),it.scanStatus=!1,it.isEnd=!0,it.time=(new Date).getTime();else ft.value=n.name,pt.value=n.topic,it.progress=parseInt(n.progress),it.progressConfig[n.topic].push(n),it.statusTotal[n.topic]=yt(it.progressConfig[n.topic]),it.allArr.push(n),3===n.status?it.error++:2===n.status&&it.warn++,1!==n.status&&(it.progressColor="#fc6d26")}},yt=function(t){var r={};return t.forEach((function(t){r[t.status]?r[t.status]++:r[t.status]=1})),r},vt=function(){var t,r;if(it.scanStatus&&!it.isEnd||it.isEnd,it.scanStatus&&!it.isEnd)return null===(r=ut)||void 0===r||r.close(),void gt();it.isEnd&>(),it.scanStatus=!0,null===(t=ut=f({route:"/ws_project",onMessage:dt}))||void 0===t||t.send({mod_name:"safe_detect",def_name:"get_safe_scan",ws_callback:""})},gt=function(){it.scanStatus=!1,it.isEnd=!1,it.error=0,it.warn=0,it.time=0,it.progress=0,it.progressColor="#20a53a",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}},mt=function(){var t,n=(t=r().mark((function t(){var e;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,A();case 3:e=t.sent,st.value=e.data,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),c(t.t0);case 10:case"end":return t.stop()}}),t,null,[[0,7]])})),function(){var r=this,n=arguments;return new Promise((function(o,a){var s=t.apply(r,n);function i(t){e(s,o,a,i,c,"next",t)}function c(t){e(s,o,a,i,c,"throw",t)}i(void 0)}))});return function(){return n.apply(this,arguments)}}();return g((function(){mt()})),function(t,r){var e,n,o,s=u,i=N,c=D,f=l,d=m("bt-loading");return w((_(),k("div",a,[x("div",F,[x("div",I,[x("div",{class:E("progresscirclebar "+(b(st).status?"security ":"")+"text-["+(100===(null===(e=b(st).msg)||void 0===e?void 0:e.security_count)?" #20a53a ":" #fc6d26 ")+"]")},[b(st).status?(_(),k(O,{key:1},[b(it).scanStatus&&!b(it).isEnd?(_(),k("div",M,[j(i,{class:"animate-spin",type:"circle",percentage:70,"show-text":!1,"stroke-width":4,"define-back-color":"#fff",color:b(it).warn||b(it).error?"#fc6d26":"#20a53a",width:100},null,8,["color"]),x("div",H,[j(s,{class:"w-[full] px-[.4rem]",src:"/firewall/icon-safe-detect".concat(b(it).warn||b(it).error?"-org":"",".svg")},null,8,["src"]),r[0]||(r[0]=x("span",{class:"text-[1.2rem] font-bold py-[.4rem] leading-none"}," 安全检测 ",-1))])])):(_(),S(i,{key:1,type:"circle",percentage:null===(n=b(st).msg)||void 0===n?void 0:n.security_count,format:ct,color:100===(null===(o=b(st).msg)||void 0===o?void 0:o.security_count)?"#20a53a":"#fc6d26",width:100},null,8,["percentage","color"]))],64)):(_(),S(s,{key:0,class:"w-[10rem]",src:"/firewall/icon-safe-detect.svg"}))],2)]),x("div",J,[x("div",Y,[b(it).isEnd?(_(),k(O,{key:1},[r[5]||(r[5]=L(" 检测已完成 ")),b(it).error>0||b(it).warn>0?(_(),k(O,{key:0},[r[4]||(r[4]=L(" ,一共发现 ")),b(it).warn>0?(_(),k(O,{key:0},[x("span",q,P(b(it).warn),1),r[1]||(r[1]=L(" 项风险项 "))],64)):T("",!0),b(it).error>0?(_(),k(O,{key:1},[r[2]||(r[2]=L(" (包含 ")),x("span",z,P(b(it).error),1),r[3]||(r[3]=L(" 项危险项,请立即处理) "))],64)):T("",!0)],64)):T("",!0)],64)):(_(),k(O,{key:0},[L(P(b(lt)),1)],64))]),b(it).scanStatus?(_(),S(i,{key:0,percentage:b(it).progress,color:b(it).warn||b(it).error?"#fc6d26":"#20a53a","stroke-width":10},null,8,["percentage","color"])):T("",!0),x("div",B,P(b(ht)),1)]),x("div",R,[j(c,{type:b(it).scanStatus&&!b(it).isEnd?"warning":"primary",onClick:vt,plain:!(!b(it).scanStatus||b(it).isEnd)},{default:C((function(){return[L(P(b(it).scanStatus&&!b(it).isEnd?"取消扫描":b(it).isEnd?"重新检测":"立即检测"),1)]})),_:1},8,["type","plain"]),j(f,{class:"!absolute -bottom-[2.5rem] right-[1.4rem]",href:"https://www.bt.cn/bbs/thread-126643-1-1.html"},{default:C((function(){return r[6]||(r[6]=[L(" 需求反馈>> ")])})),_:1})])]),x("div",K,[(_(),k(O,null,G(at,(function(t,r){return x("div",{key:r,class:E([r+"_item "+(b(it).active[r]?"active":""),"progress_item"])},[x("div",{class:"progress_item_header",onClick:function(t){return function(t){it.active[t]=!it.active[t]}(r)}},[x("div",U,[j(s,{class:"title-icon",src:"/firewall/icon-"+r+".svg"},null,8,["src"]),x("span",null,P(t),1)]),x("div",V,[b(it).statusTotal[r]?(_(),k(O,{key:0},[b(it).statusTotal[r][3]||b(it).statusTotal[r][2]?(_(),k(O,{key:0},[b(it).statusTotal[r][3]?(_(),k("span",W," 发现"+P(b(it).statusTotal[r][3])+"项危险 ",1)):T("",!0),b(it).statusTotal[r][2]?(_(),k("span",X,P((b(it).statusTotal[r][3]?"":"发现")+b(it).statusTotal[r][2])+"项警告 ",1)):T("",!0)],64)):b(it).scanStatus&&b(pt)==r?(_(),k("span",Z," 正在扫描... ")):(_(),k("span",$,"无风险项"))],64)):(_(),k(O,{key:1},[b(it).scanStatus&&!b(it).statusTotal[r]?(_(),k("span",tt," 等待扫描 ")):T("",!0)],64))]),x("div",rt,[j(s,{src:"/firewall/arrow-down.svg"})])],8,Q),x("div",et,[b(it).progressConfig[r]&&b(it).progressConfig[r].length?(_(!0),k(O,{key:0},G(b(it).progressConfig[r],(function(t,r){return _(),k("div",{key:r,class:E([t.info?"active":"","progress_item_info"])},[x("div",nt,[x("div",null,P(t.name.replace("分析网站","")),1),x("div",{class:E("text-["+h[t.status<0?0:t.status].color+"]")},P(h[t.status<0?0:t.status].text),3)]),x("div",ot,P(t.info||""),1)],2)})),128)):T("",!0)])],2)})),64))])])),[[d,b(p)]])}}});t("default",p(at,[["__scopeId","data-v-3a1d5614"]]))}}}))}();
Save File
Cancel