HEX
Server: nginx/1.28.3
System: Linux ip-172-31-12-242 6.17.0-1007-aws #7~24.04.1-Ubuntu SMP Thu Jan 22 21:04:49 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/server/panel/BTPanel/static/js/exclude-protect-ext.js
import{_ as M}from"./index118.js?v=1777008528";import{k as E,cO as O,d3 as R,d4 as z,f as L,cZ as A}from"./utils-lib.js?v=1777008528";import{c as J,r as l,o as Q,I as U,J as k,p as o,j as x,k as h,e as c,v as n,q as i,Q as Z,x as G,s as K,F as W,A as X,z as Y}from"./base-lib.js?v=1777008528";import{e as ee,g as te,w as ae,b as se}from"./index3.js?v=1777008528";import{u as oe}from"./useStore2.js?v=1777008528";import{removeProtectExt as C,removeExcloud as D,getProofFind as le,addProtectExt as ne,addExcloud as ce}from"./site.js?v=1777008528";import"./__commonjsHelpers__.js?v=1777008528";import"./index119.js?v=1777008528";import"./index116.js?v=1777008528";const re={class:"pb-2rem"},ie={class:"flex gap-col-1rem"},ue={class:"flex flex-col justify-between"},de={class:"mt-8px leading-8 text-small list-disc ml-20px tamper-help-info"},pe={key:0,class:"text-danger"},me=J({__name:"exclude-protect-ext",props:{compData:{default:{}}},setup(P,{expose:N}){const T=P,V=L(),{siteInfo:r}=oe(),g=l(),v=l(!1),$=l(!1),y=l([]),s=l("");l([]);const t=l(0),B=()=>l([ee(),{label:"".concat(t.value?"扩展名/文件名":"名称或路径"),prop:"path"},te([{title:"删除",onClick:S}])]),S=async a=>{const e={siteName:r.value.name,[t.value?"protectExt":"excludePath"]:a.path},d=t.value?C:D;(await E({loading:"正在删除".concat(t.value?"保护文件名":"排除路径",",请稍后..."),request:d(e),message:!0})).status&&u()},j=()=>{ae({type:"all",path:r.value.path,change:a=>{let e=s.value?s.value.split("\n"):[];e.includes(a)||e.push(a),s.value=e.join("\n")}})},u=async()=>{v.value=!0;try{const{data:a}=await le({siteName:r.value.name});a&&(y.value=(t.value?a.protectExt:a.excludePath).map(e=>({path:e})))}catch(a){}finally{v.value=!1}},q=async()=>{if(s.value==="")return V.error("".concat(t.value?"保护文件":"排除路径","不能为空"));let a={siteName:r.value.name};t.value?a.protectExt=s.value:a.excludePath=s.value,(await E({loading:"正在添加".concat(t.value?"保护":"排除",",请稍后..."),request:t.value?ne(a):ce(a),message:!0})).status&&(s.value="",u())},w=()=>{t.value=T.compData.childType==="protect"?1:0,u()},F=[{label:"删除",value:"delete",event:async(a,e,d,p)=>{const _=async b=>{let m={siteName:r.value.name,[t.value?"protectExt":"excludePath"]:b.path};return t.value?await C(m):await D(m)};await a({title:"批量删除",content:"批量删除选中的名称或路径,防篡改开启时该路径将受保护,是否继续操作?",column:[{label:"".concat(t.value?"扩展名/文件名":"名称或路径"),prop:"path"},se()],onConfirm:async()=>(await e(_),u(),!1)})}}],H=B();return Q(w),N({init:w}),(a,e)=>{const d=O,p=Y,_=R,b=z,m=M,f=U("bt-loading");return k((x(),h("div",re,[c(m,null,{"header-left":n(()=>[i("div",ie,[c(d,{modelValue:o(s),"onUpdate:modelValue":e[0]||(e[0]=I=>Z(s)?s.value=I:null),type:"textarea",rows:4,resize:"none",width:"38rem",placeholder:"".concat(o(t)?"受保护的文件或扩展名":"排除文件或目录",",每行一条")},null,8,["modelValue","placeholder"]),i("div",ue,[i("span",null,[c(p,{type:"default",onClick:j},{default:n(()=>[...e[1]||(e[1]=[i("i",{class:"svgtofont-el-folder"},null,-1)])]),_:1})]),c(p,{type:"default",onClick:q},{default:n(()=>[G(" 添加"+K(o(t)?"保护":"排除"),1)]),_:1})])])]),"header-right":n(()=>[...e[2]||(e[2]=[])]),content:n(()=>[k(c(_,{ref_key:"excludeTableRef",ref:g,column:o(H),maxHeight:o(t)?380:420,data:o(y)},null,8,["column","maxHeight","data"]),[[f,o($)]])]),"footer-left":n(()=>[c(b,{"table-ref":o(g),options:F},null,8,["table-ref"])]),"footer-right":n(()=>[...e[3]||(e[3]=[])]),_:1}),i("ul",de,[o(t)?(x(),h(W,{key:1},[e[4]||(e[4]=X('<li class="leading-2rem" data-v-54f2b08e><div data-v-54f2b08e>支持以下4种方式</div><div data-v-54f2b08e><span data-v-54f2b08e> 1. 文件扩展名,如: <code data-v-54f2b08e>php jsp</code></span><span data-v-54f2b08e> 2. 文件名,如: <code data-v-54f2b08e>bt.php、 index.php</code></span></div><div data-v-54f2b08e><span data-v-54f2b08e> 3. 文件全路径,如: <code data-v-54f2b08e>/bt.cn/1.txt</code></span><span data-v-54f2b08e> 4. 文件相对路径,如: <code data-v-54f2b08e>app/test.php</code></span></div></li><li data-v-54f2b08e>一般添加常见容易被篡改的扩展名即可,如html,php,js等</li>',2))],64)):(x(),h("li",pe,"排除规则具备最高优先级,在此列表中的目录或文件名将不受保护"))])])),[[f,o(v)],[f,"正在获取防篡改配置信息,请稍侯","title"]])}}}),Ee=A(me,[["__scopeId","data-v-54f2b08e"]]);export{Ee as default};