VBScript之通过对比注册表查找隐藏的服务 |
本文标签:注册表,隐藏,服务 效果图: ![]() 代码(checksvr.vbs): Const HKEY_LOCAL_MACHINE = &H80000002 Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv") strKeyPath = "SYSTEM\CurrentControlSet\Services" Wscript.Echo "Checking, please wait ..." For Each subkey In arrSubKeys End If Function CheckSvr(strName) Function FormatOutTab(strName) Case strLen < 32 利用字典,速度要快很多: Wscript.Echo "[*] Checking, please wait ..." Set oDic = CreateObject("Scripting.Dictionary") Set oWmi = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2") Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv") For Each subkey In arrSubKeys oDic.RemoveAll Wscript.Echo "" Case strLen < 32 Case Else |