← Back
Editing: index-legacy323.js
!function(){function t(e){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(e)}var e=["limit"];function r(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):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 n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){u(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function u(e,r,n){return(r=function(e){var r=function(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,r||"default");if("object"!=t(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return r};var e,r={},n=Object.prototype,a=n.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var a=e&&e.prototype instanceof b?e:b,u=Object.create(a.prototype),i=new A(n||[]);return o(u,"_invoke",{value:E(t,r,i)}),u}function v(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var h="suspendedStart",g="suspendedYield",d="executing",m="completed",y={};function b(){}function w(){}function x(){}var _={};f(_,s,(function(){return this}));var k=Object.getPrototypeOf,O=k&&k(k(q([])));O&&O!==n&&a.call(O,s)&&(_=O);var j=x.prototype=b.prototype=Object.create(_);function L(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function S(e,r){function n(o,u,i,s){var c=v(e[o],e,u);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==t(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,i,s)}),(function(t){n("throw",t,i,s)})):r.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return n("throw",t,i,s)}))}s(c.arg)}var u;o(this,"_invoke",{value:function(t,e){function a(){return new r((function(r,a){n(t,e,r,a)}))}return u=u?u.then(a,a):a()}})}function E(t,r,n){var a=h;return function(o,u){if(a===d)throw Error("Generator is already running");if(a===m){if("throw"===o)throw u;return{value:e,done:!0}}for(n.method=o,n.arg=u;;){var i=n.delegate;if(i){var s=P(i,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var c=v(t,r,n);if("normal"===c.type){if(a=n.done?m:g,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=m,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,a=t.iterator[n];if(a===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")),y;var o=v(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var u=o.arg;return u?u.done?(r[t.resultName]=u.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function D(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function q(r){if(r||""===r){var n=r[s];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,u=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 u.next=u}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=x,o(j,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},r.awrap=function(t){return{__await:t}},L(S.prototype),f(S.prototype,c,(function(){return this})),r.AsyncIterator=S,r.async=function(t,e,n,a,o){void 0===o&&(o=Promise);var u=new S(p(t,e,n,a),o);return r.isGeneratorFunction(e)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},L(j),f(j,l,"Generator"),f(j,s,(function(){return this})),f(j,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=q,A.prototype={constructor:A,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(T),!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,a){return i.type="throw",i.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],i=u.completion;if("root"===u.tryLoc)return n("end");if(u.tryLoc<=this.prev){var s=a.call(u,"catchLoc"),c=a.call(u,"finallyLoc");if(s&&c){if(this.prev<u.catchLoc)return n(u.catchLoc,!0);if(this.prev<u.finallyLoc)return n(u.finallyLoc)}else if(s){if(this.prev<u.catchLoc)return n(u.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return n(u.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(u)},complete:function(t,e){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&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;T(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:q(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},r}function s(t,e,r,n,a,o,u){try{var i=t[o](u),s=i.value}catch(t){return void r(t)}i.done?e(s):Promise.resolve(s).then(n,a)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var o=t.apply(e,r);function u(t){s(o,n,a,u,i,"next",t)}function i(t){s(o,n,a,u,i,"throw",t)}u(void 0)}))}}System.register(["./index-legacy103.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./utils-lib-legacy.js?v=VERSION_NUMBER","./useStore-legacy6.js?v=VERSION_NUMBER","./config-legacy.js?v=VERSION_NUMBER"],(function(t,n){"use strict";var a,u,s,l,f,p,v,h,g,d,m,y,b,w,x,_,k,O,j,L,S,E,P,D,T,A,q,C,N,I,F,G,B,R,U,Y,J,M,W;return{setters:[function(t){a=t._},function(t){u=t.j,s=t.s,l=t.r,f=t.k,p=t.U,v=t.e,h=t.c,g=t.g,d=t.q,m=t.v,y=t.A,b=t.x,w=t.B,x=t.J,_=t.y,k=t.D},function(t){O=t.K,j=t.M,L=t.aj,S=t.P,E=t.u,P=t.p,D=t.n,T=t.L,A=t.b,q=t.cY,C=t.a7,N=t.e},function(t){I=t.J,F=t.K,G=t.M,B=t.N,R=t.O,U=t.P,Y=t.Q,J=t.L},function(t){M=t.u,W=t.W}],execute:function(){var H=t("L",u("LOG-ANALYSE-STORE",(function(){var t=l(!1),e=l({type:"logs",name:""}),r=l([]),n=l({status:!1,channel:"",cycle:0,path:"",task_id:null}),a=l({}),o=l(""),u=l(!1),s=l(0),p=f({p:1,row:10,path:""}),v=function(){var t=c(i().mark((function t(){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,O({loading:u,request:I({siteName:e.value.name}),data:{log_file:String,status:Boolean,msg:String},success:function(t){o.value=t.log_file,p.path=t.log_file,t.status||j.error(t.msg)}});case 3:return r=t.sent,t.abrupt("return",{data:r.log_file,status:r.status,msg:r.msg});case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",{data:"",status:!1,msg:"获取日志路径失败"});case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}(),h=function(){var t=c(i().mark((function t(e){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,O({loading:u,request:F(e),data:{data:Array,page:String}});case 3:return r=t.sent,t.abrupt("return",{data:r.data,total:L(r.page)});case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",{data:[],total:0,other:{}});case 11:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}(),g=function(){var t=c(i().mark((function t(){var e,r,n;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,O({loading:u,request:G({path:o.value}),data:{status:Boolean,msg:String}});case 3:return e=t.sent,r=e.status,n=e.msg,t.abrupt("return",{status:r,msg:n});case 9:return t.prev=9,t.t0=t.catch(0),t.abrupt("return",{status:!1,msg:"扫描失败"});case 13:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}(),d=function(){var e=c(i().mark((function e(r){var n,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,yt();case 2:n=e.sent,a=setInterval(c(i().mark((function e(){var u,c;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B({path:o.value});case 2:u=e.sent,c=u.data,s.value=c.msg,100===c.msg&&(clearInterval(a),n.unmount(),j.success("扫描完成"),s.value=0,t.value=!0,r&&r());case 6:case"end":return e.stop()}}),e)}))),1e3);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m={status:!1,channel:[],cycle:0,path:""},y={give:[],status:!1,cycle:1,task_id:null},b=function(){var t=c(i().mark((function t(){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,O({request:S(),success:function(t){var r=t.data.data.find((function(t){var r;return(null===(r=t.task_data)||void 0===r?void 0:r.site_name)===e.value.name&&"web_log_scan"===t.source&&"110"===t.template_id}));r?(Object.assign(n.value,{status:r.status,channel:r.sender,cycle:1,path:r.task_data.log_path}),Object.assign(E,{give:r.sender,status:r.status,cycle:1,task_id:r.id})):(Object.assign(n.value,m),Object.assign(E,y))}});case 3:return r=t.sent,r.data,t.abrupt("return",{data:{give:n.value.channel,status:n.value.status,cycle:1},status:!0,msg:"获取扫描数据成功"});case 8:return t.prev=8,t.t0=t.catch(0),t.abrupt("return",{status:!1,msg:"获取扫描数据失败"});case 12:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}(),w=function(){var t=c(i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,O({loading:"正在清空日志,请稍后...",request:R({path:o.value}),message:!0});case 3:return t.abrupt("return",{status:!0,msg:"清空日志成功"});case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",{status:!1,msg:"清空日志失败"});case 10:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}(),x=l(),_=function(){var t=c(i().mark((function t(){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,U({path:"/www/wwwlogs/"+e.value.name+".log",type:a.value.type,time:a.value.start_time});case 3:return r=t.sent,t.abrupt("return",{data:r.data.msg||[],status:r.status,msg:"获取详情数据成功"});case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",{data:[],status:!1,msg:"获取详情数据失败"});case 11:return t.prev=11,t.finish(11);case 13:case"end":return t.stop()}}),t,null,[[0,7,11,13]])})));return function(){return t.apply(this,arguments)}}(),k=l(),E=f({give:n.value.channel,status:Boolean(n.value.status),cycle:1,task_id:n.value.task_id}),P=function(){var t=c(i().mark((function t(e){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,O({loading:"正在设置定期扫描,请稍候...",request:Y(e),data:{msg:String},message:!0});case 3:return t.abrupt("return",{status:!0,msg:"设置定期扫描成功"});case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",{status:!1,msg:"设置定期扫描失败"});case 10:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(e){return t.apply(this,arguments)}}();return{isRefreshList:t,routeData:e,logPath:o,msgForm:E,scanData:n,tableData:r,tableParam:p,loading:u,percentum:s,rowData:a,getLogsTableData:h,logScanEvent:g,delAllLogDataEvent:w,tableColumn:x,getDetailData:_,logScanForm:k,onConfirmScanConfig:P,getLogsPath:v,getScanData:b,startScanTimer:d}}))),K=(t("u",(function(){return s(H())})),A());E();var Q=[["xss","XSS"],["sql","SQL"],["san","扫描"],["php","PHP攻击"],["ip","IP(top100)"],["url","URL(top100)"]],X=H(),$=s(X),z=$.routeData,V=$.logPath,Z=$.rowData,tt=$.msgForm,et=$.isRefreshList,rt=H(),nt=rt.getLogsPath,at=rt.getLogsTableData,ot=rt.getScanData,ut=rt.startScanTimer,it=rt.logScanEvent,st=rt.delAllLogDataEvent,ct=rt.getDetailData,lt=(rt.onConfirmScanConfig,function(){var t=c(i().mark((function t(e,r){var n,a;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,z.value=r,"site"===r.type||(n=s(J()),a=n.selectedWebSite,z.value={name:a.value,type:r.type}),z.value.name){t.next=5;break}return t.abrupt("return",{data:[],total:0});case 5:return t.next=7,nt();case 7:return t.next=9,ot();case 9:return t.next=11,at(o(o({},e),{},{path:V.value}));case 11:return t.abrupt("return",t.sent);case 14:return t.prev=14,t.t0=t.catch(0),t.abrupt("return",{data:[],total:0});case 18:case"end":return t.stop()}}),t,null,[[0,14]])})));return function(e,r){return t.apply(this,arguments)}}()),ft=function(){var t=c(i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P({title:"清空扫描日志【".concat(z.value.name,"】"),type:"input",input:{content:"清空日志"},icon:"warning-filled",content:"风险操作,清空该扫描日志后,将无法查到以往的扫描日志记录,此操作不可逆,是否继续清空?"});case 2:return t.next=4,st();case 4:et.value=!0;case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),pt=function(){var t=c(i().mark((function t(){var e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P({title:"日志扫描",icon:"warning-filled",content:"建议在服务器负载较低时进行安全分析,本次将对【".concat(z.value.name,".log】文件进行扫描,可能等待时间较长,是否继续?")});case 2:return t.next=4,it();case 4:if((e=t.sent).status){t.next=7;break}return t.abrupt("return",K.error(e.msg));case 7:ut();case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),vt=l([{label:"访问次数",prop:"num",width:80},{label:"访问路径",prop:"path",showOverflowTooltip:!0}]),ht=function(){var t=c(i().mark((function t(e,r){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Z.value=e,Z.value.type=r,["sql","san","xss","php"].includes(r)||(vt.value[1].label="url"===r?"访问URL":"访问ip"),D({title:"日志详情",area:72,compData:{row:e,type:r},component:function(){return T((function(){return n.import("./log-detail-legacy.js?v=VERSION_NUMBER")}),void 0,n.meta.url)}});case 5:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),gt=p([{label:"攻击ip",prop:"ip"},{label:"攻击时间",prop:"time"},{label:"user-agent",prop:"ua",showOverflowTooltip:!0},{label:"请求URL",width:210,render:function(t){return"san"===Z.value.type?t.url:v("span",{class:"bg-[#f9f2f4] text-[#c7254e] break-words"},[t.url])}}]),dt=t("t",l()),mt=(t("r",function(){var t=c(i().mark((function t(e){var r,n,a,o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,ct();case 3:if(r=t.sent,n=r.data,a=r.status,r.msg,o=["sql","san","xss","php"],dt.value=o.includes(e)?gt.value:vt.value,a){t.next=11;break}return t.abrupt("return",{data:[],total:0,other:{}});case 11:return t.abrupt("return",{data:n,total:n.length,other:{}});case 14:return t.prev=14,t.t0=t.catch(0),t.abrupt("return",{data:[],total:0,other:{}});case 18:case"end":return t.stop()}}),t,null,[[0,14]])})));return function(e){return t.apply(this,arguments)}}()),t("s",function(){var t=c(i().mark((function t(e,r,n){var a,o,u,s,c,l;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r();case 3:if(a=tt.value,o=a.give,a.cycle,u=a.status,s=a.task_id,c={template_id:110,task_data:JSON.stringify({task_data:{tid:"110",type:"web_log_scan",title:"Web日志扫描告警",status:u,count:0,interval:600,project:"",site_name:z.value.name},sender:o||[]})},!u){t.next=11;break}return t.next=8,O({request:M(c),loading:"正在设置定期扫描告警",message:!0});case 8:l=t.sent,t.next=17;break;case 11:if(s){t.next=14;break}return K.error("请开启自动扫描"),t.abrupt("return",!1);case 14:return t.next=16,O({loading:"正在关闭告警任务,请稍候...",request:W({task_id:s}),message:!0});case 16:l=t.sent;case 17:return et.value=!0,t.abrupt("return",l.status);case 21:t.prev=21,t.t0=t.catch(0);case 24:case"end":return t.stop()}}),t,null,[[0,21]])})));return function(e,r,n){return t.apply(this,arguments)}}()),function(){if(""===V.value)return K.error("配置文件丢失");D({title:"定期扫描",area:48,showFooter:!0,component:function(){return T((function(){return n.import("./scan-form-legacy.js?v=VERSION_NUMBER")}),void 0,n.meta.url)}})}),yt=function(){return D({title:!1,component:function(){return T((function(){return n.import("./progress-legacy.js?v=VERSION_NUMBER")}),void 0,n.meta.url)},area:40})},bt=h({__name:"index",props:{type:{default:"logs"},name:{default:""}},setup:function(t,n){var u=n.expose,i=t,c=E().mainHeight,l=g((function(){return"site"===i.type?426:c.value-426})),f=H(),p=s(f),h=p.isRefreshList,O=p.scanData,j=q({request:function(t){var r=t.limit,n=function(t,e){if(null==t)return{};var r,n,a=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}(t,e);return lt(o(o({},n),{},{row:r}),i)},columns:[{label:"扫描时间",prop:"start_time",showOverflowTooltip:!0},{label:"耗时",prop:"time",render:function(t){var e;return(null===(e=t.time)||void 0===e?void 0:e.substring(0,4))+"秒"}}].concat(r(Q.map((function(t){return{label:t[1],prop:t[0],width:"ip"!==t[0]&&"php"!==t[0]&&"url"!==t[0]?50:"auto",render:function(e){return e[t[0]]?v("span",{class:"bt-link ".concat("ip"===t[0]||"url"===t[0]?"":"!text-danger"),onClick:function(){return ht(e,t[0])}},[e[t[0]]]):v("span",null,[e[t[0]]])}}}))),[{label:"合计",render:function(t){var e=0;for(var r in t)"start_time"!=r&&"time"!=r&&"ip"!=r&&"url"!=r&&"is_status"!=r&&t[r]>0&&(e+=t[r]);return v("span",null,[e])}}]),extension:[C(h)]}),L=j.BtTable,S=j.BtPage;return u({init:j.refresh}),function(t,e){var r=k,n=a;return d(),m("div",null,[v(n,null,{"header-left":y((function(){return[v(r,{onClick:b(pt),type:"primary"},{default:y((function(){return e[0]||(e[0]=[w("日志扫描")])})),_:1},8,["onClick"]),v(r,{type:"default",class:x({"not-status":!Boolean(b(O).status)}),onClick:b(mt)},{default:y((function(){return[e[1]||(e[1]=w(" 定期扫描 ")),_("i",{class:x("text-[1.2rem] svgtofont-icon-".concat(b(O).status?"start text-[#20a53a]":"stop text-danger"," "))},null,2)]})),_:1},8,["class","onClick"]),v(r,{onClick:b(ft)},{default:y((function(){return e[2]||(e[2]=[w("清空扫描日志")])})),_:1},8,["onClick"])]})),content:y((function(){return[v(b(L),{"max-height":b(l)},null,8,["max-height"])]})),"footer-right":y((function(){return[v(b(S))]})),_:1}),e[3]||(e[3]=_("ul",{class:"mt-8px leading-8 text-[1.2rem] list-disc ml-20px"},[_("li",null,[w(" 日志安全分析:扫描网站(.log)日志中含有攻击类型的请求(类型包含: "),_("span",{class:"text-danger"},"xss,sql,san,php"),w(" ) ")]),_("li",null,"分析的日志数据包含已拦截的请求"),_("li",null,"如日志文件过大,扫描可能等待时间较长,请耐心等待")],-1))])}}});t("A",N(bt,[["__scopeId","data-v-29edfa10"]]))}}}))}();
Save File
Cancel