建立隐藏虚拟目录使用。首先要先在对应WEB目录里建立一个目录。然后利用脚本直接在Shell中创建虚拟目录。仅仅为了方便大家使用。方法如下
C:\>mdir.vbs
***************************************************************************
Usage: MDir <-w WebSite Index>
<-v Name1,Path1,Name2,Path2,...>
Example : MDir -w 1 -v "Root/Disk-C","C:\","Root/Disk-D","D:\"
***************************************************************************
Index ServerComment
___________________________________________________________________________
1 asp.com
2 asp.net
3 aspx.net
4 aspx.com
5 tmp.com
6 tmp.net
不加任何参数时,会将IIS中所有主机头罗列出来。
如果你想在 asp.com 中创建,则需要记准对应的 Index值。格式如下
C:\inetpub\wwwroot>md Root
C:\inetpub\wwwroot>Cscript mdir.vbs -w "1" -v "Root/Disk-c","c:\"
C:\inetpub\wwwroot>rd Root
就在此域名下创建了一个隐藏的虚拟目录。
访问方法:
http://asp.com/Root/Disk-c
复制代码 代码如下:
'Lilo 编写
'Lilo@Bugkidz.org
On Error Resume Next
Dim oArgs, ArgNum, ArgComputer, ArgWebSites, ArgVirtualDirs, ArgDirNames(), ArgDirPaths(), DirIndex, ArgComputers
Set oArgs = WScript.Arguments
ArgComputers = Array("LocalHost")
ArgNum = 0
While ArgNum < oArgs.Count
If (ArgNum + 1) >= oArgs.Count Then
Call DisplayUsage
End If
Select Case LCase(oArgs(ArgNum))
Case "-w":
ArgNum = ArgNum + 1
ArgWebSites = oArgs(ArgNum)
Case "-v":
ArgNum = ArgNum + 1
ArgVirtualDirs = Split(oArgs(ArgNum), ",", -1)
Case "-?"
Call DisplayUsage
End Select
ArgNum = ArgNum + 1
Wend
ArgNum = 0
DirIndex = 0
MaxWeb = CLng(ListAllWeb(0))
If Not IsNumeric(ArgWebSites) Or MaxWeb = 0 Then Call DisplayUsage
ReDim ArgDirNames((UBound(ArgVirtualDirs)+1) \ 2)
ReDim ArgDirPaths((UBound(ArgVirtualDirs)+1) \ 2)
if isArray(ArgVirtualDirs) then
While ArgNum <= UBound(ArgVirtualDirs)
ArgDirNames(DirIndex) = ArgVirtualDirs(ArgNum)
If (ArgNum + 1) > UBound(ArgVirtualDirs) Then
WScript.Echo "Error understanding virtual directories"
Call DisplayUsage
End If
ArgNum = ArgNum + 1
ArgDirPaths(DirIndex) = ArgVirtualDirs(ArgNum)
ArgNum = ArgNum + 1
DirIndex = DirIndex + 1
Wend
end if
If (ArgWebSites = "") Or (IsArray(ArgDirNames) = False or IsArray(ArgDirPaths) = False) Then
Call DisplayUsage
Else
Dim compIndex
for compIndex = 0 to UBound(ArgComputers)
Call ASTCreateVirtualWebDir(ArgComputers(compIndex),ArgWebSites,ArgDirNames,ArgDirPaths)
next
End If
Sub Display(Msg)
WScript.Echo Now & ". Error Code: " & Hex(Err) & " - " & Msg
End Sub
Sub Trace(Msg)
WScript.Echo Now & " : " & Msg
End Sub
Sub DisplayUsage()
WScript.Echo String(75,"*") & vbCrLf & "Usage: MDir <-w WebSite Index>" & vbCrLf & " <-v Name1,Path1,Name2,Path2,...>" & vbCrLf & "Example : MDir -w 1 -v ""Root/Disk-C"",""C:\"",""Root/Disk-D"",""D:\""" & vbCrLf & String(75,"*") & vbCrLf & ListAllWeb(1)
WScript.Quit
End Sub
Sub ASTCreateVirtualWebDir(ComputerName,WebSiteName,DirNames,DirPaths)
Dim Computer, webSite, WebSiteID, vRoot, vDir, DirNum
On Error Resume Next
Set webSite = GetObject("IIS://Localhost/W3SVC/" & WebSiteName)
if IsObject(webSite) then
set vRoot = webSite.GetObject("IIsWebVirtualDir", "Root")
Trace "Accessing Root For " & webSite.ADsPath
If (Err <> 0) Then
Display "Unable To Access Root for " & webSite.ADsPath
Else
DirNum = 0
If (IsArray(DirNames) = True) And (IsArray(DirPaths) = True) And (UBound(DirNames) = UBound(DirPaths)) Then
While DirNum < UBound(DirNames)
Set vDir = vRoot.Create("IIsWebVirtualDir",DirNames(DirNum))
If (Err <> 0) Then
Display "Unable To Create " & vRoot.ADsPath & "/" & DirNames(DirNum) &"."
Else
vDir.EnableDirBrowsing = True
vDir.DirBrowseShowDate = False
vDir.DirBrowseShowTime = False
vDir.DirBrowseShowSize = False
vDir.DirBrowseShowExtension = False
vDir.DirBrowseShowLongDate = True
vDir.DirBrowseFlags = -1073741762
vDir.AccessRead = True
vDir.AccessWrite = False
vDir.AccessExecute = False
vDir.AccessScript = False
vDir.AccessSource = False
vDir.AccessNoRemoteRead = False
vDir.AccessNoRemoteWrite = False
vDir.AccessNoRemoteExecute = False
vDir.AccessNoRemoteScript = False
vDir.AppIsolated = 1
vDir.AccessFlags = 1
vDir.ContentIndexed = False
vDir.CreateProcessasUser = False
vDir.DontLog = True
' vDir.DefaultDoc = ""
vDir.EnableDefaultDoc = False
vDir.AppFriendlyName = ""
vDir.AppCreate2 3
vDir.Path = DirPaths(DirNum)
If (Err <> 0) Then
Display "Unable To Bind Path " & DirPaths(DirNum) & " to " & vRootName & "/" & DirNames(DirNum) & ". Path may be invalid."
Else
'Save the changes
vDir.SetInfo
If (Err <> 0) Then
Display "Unable To Save Configuration For " & vRootName & "/" & DirNames(DirNum) &"."
Else
Trace "Web Virtual Directory " & vRootName & "/" & DirNames(DirNum) & " created successfully."
End If
End If
End If
Err = 0
DirNum = DirNum + 1
Wend
End If
End If
else
Display "Unable To Find "& WebSiteName &" on "& ComputerName
End if
Trace "Done."
End Sub
Function ListAllWeb(n)
Set ObjService=GetObject("IIS://LocalHost/W3SVC")
If n = 1 Then ListAllWeb = "" Else ListAllWeb = 0
For Each obj3w In objservice
If IsNumeric(obj3w.Name) Then
sServerName=Obj3w.ServerComment
If n = 1 Then
ListAllWeb = ListAllWeb & obj3w.Name & String(15-Len(obj3w.Name)," ") & obj3w.ServerComment & vbCrLf
Else
ListAllWeb = ListAllWeb + 1
End If
End If
Next
if n = 1 Then ListAllWeb = "Index" & String(10," ") & "ServerComment" & vbCrLf & String(75,"_") & vbCrLf & ListAllWeb
Set ObjService=Nothing
End Function
C:\>mdir.vbs
***************************************************************************
Usage: MDir <-w WebSite Index>
<-v Name1,Path1,Name2,Path2,...>
Example : MDir -w 1 -v "Root/Disk-C","C:\","Root/Disk-D","D:\"
***************************************************************************
Index ServerComment
___________________________________________________________________________
1 asp.com
2 asp.net
3 aspx.net
4 aspx.com
5 tmp.com
6 tmp.net
不加任何参数时,会将IIS中所有主机头罗列出来。
如果你想在 asp.com 中创建,则需要记准对应的 Index值。格式如下
C:\inetpub\wwwroot>md Root
C:\inetpub\wwwroot>Cscript mdir.vbs -w "1" -v "Root/Disk-c","c:\"
C:\inetpub\wwwroot>rd Root
就在此域名下创建了一个隐藏的虚拟目录。
访问方法:
http://asp.com/Root/Disk-c
复制代码 代码如下:
'Lilo 编写
'Lilo@Bugkidz.org
On Error Resume Next
Dim oArgs, ArgNum, ArgComputer, ArgWebSites, ArgVirtualDirs, ArgDirNames(), ArgDirPaths(), DirIndex, ArgComputers
Set oArgs = WScript.Arguments
ArgComputers = Array("LocalHost")
ArgNum = 0
While ArgNum < oArgs.Count
If (ArgNum + 1) >= oArgs.Count Then
Call DisplayUsage
End If
Select Case LCase(oArgs(ArgNum))
Case "-w":
ArgNum = ArgNum + 1
ArgWebSites = oArgs(ArgNum)
Case "-v":
ArgNum = ArgNum + 1
ArgVirtualDirs = Split(oArgs(ArgNum), ",", -1)
Case "-?"
Call DisplayUsage
End Select
ArgNum = ArgNum + 1
Wend
ArgNum = 0
DirIndex = 0
MaxWeb = CLng(ListAllWeb(0))
If Not IsNumeric(ArgWebSites) Or MaxWeb = 0 Then Call DisplayUsage
ReDim ArgDirNames((UBound(ArgVirtualDirs)+1) \ 2)
ReDim ArgDirPaths((UBound(ArgVirtualDirs)+1) \ 2)
if isArray(ArgVirtualDirs) then
While ArgNum <= UBound(ArgVirtualDirs)
ArgDirNames(DirIndex) = ArgVirtualDirs(ArgNum)
If (ArgNum + 1) > UBound(ArgVirtualDirs) Then
WScript.Echo "Error understanding virtual directories"
Call DisplayUsage
End If
ArgNum = ArgNum + 1
ArgDirPaths(DirIndex) = ArgVirtualDirs(ArgNum)
ArgNum = ArgNum + 1
DirIndex = DirIndex + 1
Wend
end if
If (ArgWebSites = "") Or (IsArray(ArgDirNames) = False or IsArray(ArgDirPaths) = False) Then
Call DisplayUsage
Else
Dim compIndex
for compIndex = 0 to UBound(ArgComputers)
Call ASTCreateVirtualWebDir(ArgComputers(compIndex),ArgWebSites,ArgDirNames,ArgDirPaths)
next
End If
Sub Display(Msg)
WScript.Echo Now & ". Error Code: " & Hex(Err) & " - " & Msg
End Sub
Sub Trace(Msg)
WScript.Echo Now & " : " & Msg
End Sub
Sub DisplayUsage()
WScript.Echo String(75,"*") & vbCrLf & "Usage: MDir <-w WebSite Index>" & vbCrLf & " <-v Name1,Path1,Name2,Path2,...>" & vbCrLf & "Example : MDir -w 1 -v ""Root/Disk-C"",""C:\"",""Root/Disk-D"",""D:\""" & vbCrLf & String(75,"*") & vbCrLf & ListAllWeb(1)
WScript.Quit
End Sub
Sub ASTCreateVirtualWebDir(ComputerName,WebSiteName,DirNames,DirPaths)
Dim Computer, webSite, WebSiteID, vRoot, vDir, DirNum
On Error Resume Next
Set webSite = GetObject("IIS://Localhost/W3SVC/" & WebSiteName)
if IsObject(webSite) then
set vRoot = webSite.GetObject("IIsWebVirtualDir", "Root")
Trace "Accessing Root For " & webSite.ADsPath
If (Err <> 0) Then
Display "Unable To Access Root for " & webSite.ADsPath
Else
DirNum = 0
If (IsArray(DirNames) = True) And (IsArray(DirPaths) = True) And (UBound(DirNames) = UBound(DirPaths)) Then
While DirNum < UBound(DirNames)
Set vDir = vRoot.Create("IIsWebVirtualDir",DirNames(DirNum))
If (Err <> 0) Then
Display "Unable To Create " & vRoot.ADsPath & "/" & DirNames(DirNum) &"."
Else
vDir.EnableDirBrowsing = True
vDir.DirBrowseShowDate = False
vDir.DirBrowseShowTime = False
vDir.DirBrowseShowSize = False
vDir.DirBrowseShowExtension = False
vDir.DirBrowseShowLongDate = True
vDir.DirBrowseFlags = -1073741762
vDir.AccessRead = True
vDir.AccessWrite = False
vDir.AccessExecute = False
vDir.AccessScript = False
vDir.AccessSource = False
vDir.AccessNoRemoteRead = False
vDir.AccessNoRemoteWrite = False
vDir.AccessNoRemoteExecute = False
vDir.AccessNoRemoteScript = False
vDir.AppIsolated = 1
vDir.AccessFlags = 1
vDir.ContentIndexed = False
vDir.CreateProcessasUser = False
vDir.DontLog = True
' vDir.DefaultDoc = ""
vDir.EnableDefaultDoc = False
vDir.AppFriendlyName = ""
vDir.AppCreate2 3
vDir.Path = DirPaths(DirNum)
If (Err <> 0) Then
Display "Unable To Bind Path " & DirPaths(DirNum) & " to " & vRootName & "/" & DirNames(DirNum) & ". Path may be invalid."
Else
'Save the changes
vDir.SetInfo
If (Err <> 0) Then
Display "Unable To Save Configuration For " & vRootName & "/" & DirNames(DirNum) &"."
Else
Trace "Web Virtual Directory " & vRootName & "/" & DirNames(DirNum) & " created successfully."
End If
End If
End If
Err = 0
DirNum = DirNum + 1
Wend
End If
End If
else
Display "Unable To Find "& WebSiteName &" on "& ComputerName
End if
Trace "Done."
End Sub
Function ListAllWeb(n)
Set ObjService=GetObject("IIS://LocalHost/W3SVC")
If n = 1 Then ListAllWeb = "" Else ListAllWeb = 0
For Each obj3w In objservice
If IsNumeric(obj3w.Name) Then
sServerName=Obj3w.ServerComment
If n = 1 Then
ListAllWeb = ListAllWeb & obj3w.Name & String(15-Len(obj3w.Name)," ") & obj3w.ServerComment & vbCrLf
Else
ListAllWeb = ListAllWeb + 1
End If
End If
Next
if n = 1 Then ListAllWeb = "Index" & String(10," ") & "ServerComment" & vbCrLf & String(75,"_") & vbCrLf & ListAllWeb
Set ObjService=Nothing
End Function
华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com
暂无评论...
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?
更新日志
2024年11月19日
2024年11月19日
- 许秋怡.1995-电影少女【丽音唱片】【FLAC分轨】
- 【中国艺术歌曲典藏】温雅欣《她比烟花寂寞》紫银合金SQCD【低速原抓WAV+CUE】
- 张国荣《FinalEncounter》头版限量编号MQA-UHQ[低速原抓WAV+CUE].
- 发烧萨克斯-雪国之春(SRS+WIZOR)[原抓WAV+CUE]
- 王铮亮《慢人理论》[320K/MP3][175.31MB]
- 王铮亮《慢人理论》[FLAC/分轨][524.11MB]
- 陈致逸《赴梦之约 游戏主题原声音乐》[320K/MP3][35.82MB]
- 沈文程.1998-历年畅销歌曲精选3CD旧情也绵绵【乡城】【WAV+CUE】
- 群星.2022-福茂巨星·时空之轮日本唱片志系列DISC1黄舒骏-为你疯狂【福茂】【WAV+CUE】
- 群星.2022-福茂巨星·时空之轮日本唱片志系列DISC2范晓萱-RAIN【福茂】【WAV+CUE】
- 王闻-《男人四十4》[正版CD低速原抓WAV+CUE]
- 青燕子-八只眼演唱组《爱心》[WAV+CUE]
- 祁露想着你的好》WAV+CUE
- 陈致逸《赴梦之约 游戏主题原声音乐》[FLAC/分轨][159.96MB]
- 贵族音乐《睡眠自然流水声 ASMR白噪音背景音》[320K/MP3][155.72MB]