会脚本语言的朋友进

来源:百度知道 编辑:UC知道 时间:2024/06/10 09:37:04
我不会脚本,帮忙看一下这个程序对系统有危险吗?最好通俗的讲解一下它对系统进行了什么操作?

ON ERROR RESUME NEXT

Dim VOL_PROD_KEY
if Wscript.arguments.count<1 then
VOL_PROD_KEY=InputBox("com"&vbCr&vbCr&" 本程序将自动替换你当前 Windows 的序列号。"&vbCr&vbCr&"序列号(OEM版无效,默认版本为 XP VLK):","Windows XP序列号自动更换器","RPWBY")
if VOL_PROD_KEY="" then
Wscript.quit
end if
else
VOL_PROD_KEY = Wscript.arguments.Item(0)
end if

VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any

for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")

result = Obj.SetProductKey (VOL_PROD_KEY)

if err = 0 then
Wscript.echo "OK!去微软验证吧!"
end if

if err <> 0 then
Wscript.echo "替换失败!输入的 CD-KEY 与当前的版本不匹配。"
Err.Clear
end if

Next

回答的详细点呀

着是一段VBScript脚本,依靠Wscript.exe解释执行,当系统开放给WScript的权限过大时可能造成对系统的安全隐患.这段代码通过创建Windows 管理规范 (WMI)对象.即这句GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")
)完成所做操作.WMI相当于你操作控制面板一样.这程序所做操作也是系统所允许的操作,没有对系统危险一说,只是可能造成安全性问题.

最好别运行