← Back
Editing: index-legacy277.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)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return n};var r,n={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=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(r){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),u=new G(n||[]);return i(a,"_invoke",{value:O(t,r,u)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",g={};function w(){}function b(){}function x(){}var _={};f(_,c,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(I([])));L&&L!==o&&a.call(L,c)&&(_=L);var j=x.prototype=w.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function S(e,r){function n(o,i,u,c){var l=p(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&a.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):r.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,c)}))}c(l.arg)}var o;i(this,"_invoke",{value:function(t,e){function a(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(a,a):a()}})}function O(t,e,n){var o=y;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:r,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=p(t,e,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function P(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,P(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=p(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,g;var i=a.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function N(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function I(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(a.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}throw new TypeError(t(e)+" is not iterable")}return b.prototype=x,i(j,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,s,"GeneratorFunction")),t.prototype=Object.create(j),t},n.awrap=function(t){return{__await:t}},E(S.prototype),f(S.prototype,l,(function(){return this})),n.AsyncIterator=S,n.async=function(t,e,r,o,a){void 0===a&&(a=Promise);var i=new S(h(t,e,r,o),a);return n.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(j),f(j,s,"Generator"),f(j,c,(function(){return this})),f(j,"toString",(function(){return"[object Generator]"})),n.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}},n.values=I,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},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 e=this;function n(n,o){return u.type="throw",u.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.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 i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},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),g},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),C(r),g}},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 o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:I(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},n}function r(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function u(t){r(i,o,a,u,c,"next",t)}function c(t){r(i,o,a,u,c,"throw",t)}u(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./index-legacy117.js?v=VERSION_NUMBER","./index-legacy103.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./firewall-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER"],(function(t,r){"use strict";var o,a,i,u,c,l,s,f,h,p,y,d,v,m,g,w,b,x,_,k,L,j,E,S,O,P,N,C,G,I,T,F,V,q,H,A,D;return{setters:[function(t){o=t.u,a=t.n,i=t.L,u=t.K,c=t.M,l=t.p,s=t.aq,f=t.l,h=t.k,p=t.j},function(t){y=t._},function(t){d=t._},function(t){v=t.c,m=t.r,g=t.b4,w=t.e,b=t.al,x=t.p,_=t.G,k=t.q,L=t.v,j=t.x,E=t.A,S=t.B,O=t.H,P=t.y,N=t.M,C=t.P,G=t.D},function(t){I=t.Z,T=t.S,F=t._,V=t.$,q=t.a0,H=t.n},function(t){A=t.u},function(t){D=t.l},null,null],execute:function(){var z={key:0},M={class:"p-[2rem] flex items-center"};t("default",v({__name:"index",setup:function(t){var v=o(),U=(v.mainHeight,v.payment),Y=m(!1),B=m(""),K=m(!1),Z=m([]),$=m([]),J=m(!1),Q=g({title:"SSH系统账号管理-功能介绍",ps:"SSH系统账号管理通常涉及到在服务器上创建、删除和管理SSH用户账户的过程。这些账户可以用于通过SSH(安全壳层)协议远程访问服务器。这种管理工作通常由系统管理员进行,以确保只有授权的用户可以访问服务器。",source:305,desc:["创建系统用户","修改系统用户密码","删除系统用户","记录日志","防入侵"],isInstall:J.value,tabImgs:[{title:"概览",imgSrc:"https://www.bt.cn/Public/new/plugin/introduce/firewall/ssh_system_manage.png"}],pluginInfo:{name:"bt_security"}}),R=function(){var t=n(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:D({name:"bt_security"});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),W=function(){a({title:"创建系统用户",area:42,showFooter:!0,compData:{refreshFn:nt},component:function(){return i((function(){return r.import("./add-user-legacy.js?v=VERSION_NUMBER")}),void 0,r.meta.url)}})},X=function(){var t=n(e().mark((function t(n){var o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u({loading:"正在获取日志,请稍后...",request:I({user:n[0]}),data:Array});case 2:if((o=t.sent).length){t.next=5;break}return t.abrupt("return",c.error("当前暂无日志"));case 5:$.value={user:n[0],dateTime:o[0],dateOptions:o.map((function(t){return{title:t,key:t}}))},a({title:"命令日志",area:72,component:function(){return i((function(){return r.import("./index-legacy459.js?v=VERSION_NUMBER")}),void 0,r.meta.url)},compData:$.value});case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),tt=function(){var t=n(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(B.value){t.next=2;break}return t.abrupt("return",c.error("请输入新密码"));case 2:return t.next=4,u({loading:"正在设置密码,请稍后...",request:T({username:$.value[0],password:B.value}),message:!0});case 4:Y.value=!1,B.value="";case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),et=function(){var t=n(e().mark((function t(r){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l({icon:"warning-filled",title:"删除[".concat(r[0],"]用户"),content:"危险操作,正在删除[".concat(r[0],"]用户,请在下方输入'确认删除'"),input:{content:"确认删除"},type:"input"});case 2:return t.next=4,u({loading:"正在删除中,请稍后...",request:F({username:r[0]}),message:!0});case 4:nt();case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),rt=function(){var t=n(e().mark((function t(r,n,o){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u({loading:"正在"+(r?"开启":"关闭")+(3===o?"防入侵":"记录日志")+",请稍后...",request:3===o?V(r,{user:n[0]}):q(r,{uid:n[1]}),message:!0});case 2:nt();case 3:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),nt=function(){var t=n(e().mark((function t(){var r,n,o;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return K.value=!0,t.next=3,H();case 3:if(r=t.sent,n=r.data,o=r.msg,n.status||"插件不存在!"!==o){t.next=11;break}return Q.isInstall=!1,J.value=!0,ot(),t.abrupt("return");case 11:Q.isInstall=!0,J.value=!1,Z.value=n.system_user,K.value=!1;case 15:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ot=function(){var t=n(e().mark((function t(){var r,n;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s({sName:"bt_security"});case 3:r=t.sent,n=r.data,Q.pluginInfo=n,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}(),at=[{label:"用户名",render:function(t){return t[0]}},{label:"防入侵",width:100,render:function(t){return w(b,{modelValue:t[3],size:"small",onChange:function(e){return rt(e,t,3)}},null)}},{label:"记录日志",width:100,render:function(t){return w(b,{modelValue:t[5],size:"small",onChange:function(e){return rt(e,t,5)}},null)}},{label:"备注",render:function(t){return t[6]}},A([{onClick:X,title:"命令日志",width:70},{onClick:function(t){$.value=t,Y.value=!0},title:"重置密码",width:70},{onClick:et,title:"删除"}])];return x(nt),function(t,e){var r=G,n=f,o=d,a=y,i=h,u=p,c=_("bt-loading");return k(),L("div",null,["ltd"!==j(U).authType||j(J)?(k(),N(a,{key:1,data:j(Q),class:"px-[20%] py-[2rem]"},null,8,["data"])):(k(),L("div",z,[w(o,null,{"header-left":E((function(){return[w(r,{type:"primary",onClick:W},{default:E((function(){return e[3]||(e[3]=[S(" 创建系统用户 ")])})),_:1}),w(r,{onClick:R},{default:E((function(){return e[4]||(e[4]=[S("堡塔防入侵")])})),_:1})]})),content:E((function(){return[O(w(n,{column:at,data:j(Z)},null,8,["data"]),[[c,j(K)],[c,"正在加载列表,请稍后...","title"]])]})),_:1}),e[5]||(e[5]=P("ul",{class:"mt-[.8rem] leading-8 text-[1.2rem] list-disc ml-[2rem]"},[P("li",null,"开启防提权,系统会针对该用户操作命令进行限制,并记录跟踪"),P("li",null,"不开启防提权,系统只针对该用户操作过的命令做记录跟踪"),P("li",null,"目前防提权默认只针对www,redis,mysql操作引起的提权问题进行处理"),P("li",{class:"text-danger"},"消息推送需要更新至最新面板的版本(2020-06-17日之后安装的版本|或者2020-06-17日之后点击过修复面板)")],-1))])),w(u,{title:"修改密码",modelValue:j(Y),"onUpdate:modelValue":e[1]||(e[1]=function(t){return C(Y)?Y.value=t:null}),area:38,showFooter:"",onConfirm:tt,onCancel:e[2]||(e[2]=function(){return B.value=""})},{default:E((function(){return[P("div",M,[e[6]||(e[6]=P("span",{class:"inline-block w-[8rem] text-right"},"新密码",-1)),w(i,{class:"ml-[1.2rem]",isNull:!0,iconType:"refresh",modelValue:j(B),"onUpdate:modelValue":e[0]||(e[0]=function(t){return C(B)?B.value=t:null}),placeholder:"请输入新密码"},null,8,["modelValue"])])]})),_:1},8,["modelValue"])])}}}))}}}))}();
Save File
Cancel