vbs脚本法:SetWshShell=Wscript.CreateObject("Wscript.Shell"),WshShell.RegDelete"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\PendingFileRenameOperations",SetWshShell=Nothing将上面的脚本保存到文本文件里,文本文件扩展名由txt改名为vbs即可。
vbs文件执行的时候,双击即可。双击后再尝试安装软件,如果不再有重启提示,即为成功。
mima = "123"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加密:复制以下代码,用记事本另存为,“VBS加密” 保存。
set fso=createobject("scripting.filesystemobject")
scf=inputbox("请输入要加密的脚本文件名","VBS加密程序","*.vbs")
set op=fso.opentextfile(scf)
dow=13
do while op.atendofstream=false
line=op.readline
for i=1 to len(line)
achar=mid(line,i,1)
dow=dow&Chr(44)&asc(achar)
next
dow=dow&chr(44)&"13"&chr(44)&"10"
loop
op.close
set op=fso.opentextfile(scf,2)
op.write "strs=array("&dow&")"&chr(13)&chr(10)&_
"for i=1 to UBound(strs)"&chr(13)&chr(10)&_
"runner=runner&chr(strs(i))"&chr(13)&chr(10)&_
"next"&chr(13)&chr(10)&_
"Execute runner"
VBS解密
复制以下代码,用记事本另存为,“VBSVBS解密” 保存。
on error resume next
set fso=createobject("scripting.filesystemobject")
set ws=createobject("wscript.shell")
Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "vbs File|*.vbs|All Files|*.*"
objDialog.InitialDir = ""
objDialog.ShowOpen
strLoadFile = objDialog.FileName
if not strLoadFile = "" then
set file=fso.opentextfile(strLoadFile,1)
all=file.readall
file.close
s=instr(1,all,"next")
alls=mid(all,1, s+3 )
set file=fso.createtextfile(strLoadFile,8,true)
file.write alls
file.writeline empty
file.writeline"set fso=createobject("&""""&"scripting.filesystemobject"&""""&")"
file.writeline"set file=fso.createtextfile(wscript.scriptfullname,8,true)"
file.writeline"file.write runner"
file.writeline"file.close"
file.close
ws.run""""&strLoadFile&"""",0,true
msgbox"解密成功!",4096+64
end if
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)