i = 0
do
if i >= 3 then wscript.quit
a = inputbox("请输入密码" & vbcrlf & "您还有" & 3 - i & "次机会")
if a = false then wscript.quit
i = i + 1
loop until a = mima
msgbox "密码正确"
上面的代码可以实现你要的功能,但密码一眼就能看见,可以使用下面的脚本代码进行加密。
Option ExplicitDim se, fso
Dim argv, file, str
Set se = CreateObject("Scripting.Encoder")
Set fso = CreateObject("Scripting.FilesystemObject")
For Each argv In WScript.Arguments
Set file = fso.OpenTextFile(argv)
str = file.ReadAll
file.Close
str = se.EncodeScriptFile(".vbs", str, 0 , "")
argv = Left(argv, Len(argv)-3) & ".vbe"
Set file = fso.OpenTextFile(argv, 2, True)
file.Write str
file.Close
Next
MsgBox "OK", vbInformation
最后生成的文件可以下载附件。要破解就有一定难度
一般是很难破解的vbs脚本法:SetWshShell=Wscript.CreateObject("Wscript.Shell"),WshShell.RegDelete"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\PendingFileRenameOperations",SetWshShell=Nothing将上面的脚本保存到文本文件里,文本文件扩展名由txt改名为vbs即可。
vbs文件执行的时候,双击即可。双击后再尝试安装软件,如果不再有重启提示,即为成功。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)