|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
ActiveServerPage技术为应用开发商提供了基于脚本的直观、快速、高效的应用开发手段,极大地提高了开发的效果。在讨论ASP的安全性问题之前,让我们来看看ASP是怎么工作的。<%@Language=VBScript%>
<HTML>
<HEAD>
<METANAME="GENERATOR"Content="MicrosoftVisualStudio6.0">
<title>ADSIDomainbrowser</title>
</HEAD>
<BODY>
<!--Author:AdrianForbes-->
<%
sDomain=Request("Domain")
sComputer=Request("Computer")
sGroup=Request("Group")
sUser=Request("User")
iflen(trim(sUser))>0then
SetobjGroup=GetObject("WinNT://"&sDomain&"/"&sComputer&"/"&sUser)
ForEachobjUserInobjGroup.Groups
Response.WriteobjUser.Name&"<br>"&vbCrLf
Next
Response.Write"</table><p><ahref=adsi.asp?Domain="&sDomain&"&Computer="&sComputer&">Backto"&sComputer&"</a></p>"
elseiflen(trim(sGroup))>0then
SetobjGroup=GetObject("WinNT://"&sDomain&"/"&sComputer&"/"&sGroup)
ForEachobjUserInobjGroup.Members
Response.WriteobjUser.Name&"<br>"&vbCrLf
Next
Response.Write"</table><p><ahref=adsi.asp?Domain="&sDomain&"&Computer="&sComputer&">Backto"&sComputer&"</a></p>"
elseiflen(trim(sComputer))>0then
SetobjComputer=GetObject("WinNT://"&sDomain&"/"&sComputer)
Response.Write"<tableborder=0>"
ForEachobjObjectInobjComputer
ifstrcomp(objObject.Class,"group",1)=0then
Response.Write"<tr><td>"&objObject.Class&"</td><td><ahref=adsi.asp?Domain="&sDomain&"&Computer="&sComputer&"&Group="&objObject.Name&">"&objObject.Name&"</a></td></tr>"&vbCrLf
elseifstrcomp(objObject.Class,"user",1)=0then
Response.Write"<tr><td>"&objObject.Class&"</td><td><ahref=adsi.asp?Domain="&sDomain&"&Computer="&sComputer&"&User="&objObject.Name&">"&objObject.Name&"</a></td></tr>"&vbCrLf
else
Response.Write"<tr><td>"&objObject.Class&"</td><td>"&objObject.Name&"</td></tr>"&vbCrLf
endif
Next
Response.Write"</table><p><ahref=adsi.asp?Domain="&sDomain&">Backto"&sDomain&"</a></p>"
elseiflen(trim(sDomain))>0then
SetobjDomain=GetObject("WinNT://"&sDomain)
ForEachobjComputerInobjDomain
ifstrcomp(objComputer.Class,"computer",1)=0then
Response.Write"<ahref=adsi.asp?domain="&sDomain&"&computer="&objComputer.Name&">"&objComputer.Name&"<br>"
endif
Next
Response.Write"<p><ahref=adsi.asp>Backtodomainlist</a></p>"
else
SetobjWinNT=GetObject("WinNT:")
ForEachobjDomainInobjWinNT
ifstrcomp(objDomain.Class,"domain",1)=0then
Response.Write"<ahref=adsi.asp?domain="&objDomain.Name&">"&objDomain.Name&"<br>"
endif
Next
endif
%>
</BODY>
</HTML>
ASP一般认为只能运行在IIS上,正如前面所提到的,这并不是十分正确,事实上,ASP也能运行在Apache上。ApacheASP可在任意Apache服务器上运行有限的ASP功能,所需做的,只需打开mod_perl。 |
|