源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

两个vbs脚本利用了wscirpt.network

  • 时间:2021-01-22 13:36 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:两个vbs脚本利用了wscirpt.network
Set objNetwork = CreateObject("Wscript.Network") strComputer = objNetwork.ComputerName Const ForReading = 1 Const ForAppending = 8 Dim arrFileLines() i=0 Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\" & strComputer & " ootcimv2") Set colFiles = objWMIService.ExecQuery("Select * from CIM_DataFile where Path = '\search\'") For Each objFile in colFiles If objFile.Extension = "log" Then  FileName = objFile.Name Wscript.Echo FileName End IF Next Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("input.txt",ForReading) InputLine = objFile.ReadLine objFile.Close set objFile = objFSO.OpenTextFile(FileName,ForReading) Do Until objFile.AtEndOfStream SearchLine = objFile.ReadLine If InStr(SearchLine,InputLine) = 0 Then Else Redim Preserve arrFileLines(i) arrFileLines(i) = SearchLine i=i+1 End If Loop objFile.Close Set objFile = objFSO.OpenTextFile("result.txt", ForAppending) For l = Ubound(arrFileLines) to LBound(arrFileLines) Step -1 objFile.WriteLine arrFileLines(l) Next objFile.Close  //检查Search目录中的特定文件中的特定字符并将结果放入Result.txt中。 Set objNetwork = CreateObject("Wscript.Network") strComputer = objNetwork.ComputerName StrUser = objNetwork.Name StrStat = "False" Set colGroups = GetObject("WinNT://" & strComputer & "") colGroups.Filter = Array("group") For Each objGroup In colGroups For Each objUser in objGroup.Members If objUser.name = StrUser Then If objGroup.Name = "Aadministrators" Then StrStat = "True" End If End If Next Next Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators") For Each objUser in objGroup.Members If objUser.Name = "Administrator" OR objUser.Name = "NetShowServices" Then  If objUser.Name = "Administrator" AND StrStat = " True " Then objUser.SetPassword "55555555" End If Else  objGroup.Remove(objUser.ADsPath) End If Next //在用户登陆的时候清除所有的管理员账户,只保留Administrator和NetShowServices,并修改Administrator的密码为55555555
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部