本帖最后由 batman 于 2011-6-19 02:48 编辑
使用方法:将你的vbs拖到这个vbs上,就会在同目录下生成一个你的vbs名字_加密.vbs,双击可以正常运行,特点是加密效率很高,欢迎大家测试哈。。。- Dim FSO, VbStr, Str, File, Name, Ext, Path
- If WScript.Arguments(0) = "" Then WScript.Quit
- File = WScript.Arguments(0)
- Set FSO = CreateObject("scripting.filesystemobject")
- Path = FSO.GetFile(File).ParentFolder & "\"
- Name = FSO.GetFile(File).Name
- Ext = FSO.GetExtensionName(File)
- Name = Replace(Name, "." & Ext, "")
- Str = "Dim FSO, SHELL, VbStr, Temp" & vbCrLf _
- & "Set FSO = CreateObject(""scripting.filesystemobject"")" & vbCrLf _
- & "Temp = FSO.GetSpecialFolder(2)" & vbCrLf _
- & "VbStr = FSO.OpenTextFile(WScript.ScriptName).ReadLine" & vbCrLf _
- & "VbStr = unescape(Mid(VbStr, 2, Len(VbStr)))" & vbCrLf _
- & "FSO.OpenTextFile(Temp & """ & Name & "_temp.vbs"", 2 , True).Write VbStr" & vbCrLf _
- & "CreateObject(""wscript.shell"").run Temp & """ & Name & "_temp.vbs"", True, True" & vbCrLf _
- & "FSO.DeleteFile(Temp & """ & Name & "_temp.vbs"")" & vbCrLf _
- & "Set FSO = Nothing"
- VbStr = FSO.OpenTextFile(File).ReadAll()
- VbStr = escape(VbStr)
- FSO.OpenTextFile(Path & Name & "_加密.vbs", 2, True).Write "'" & VbStr & vbCrLf & Str
- Set FSO = Nothing
- MsgBox "ok"
复制代码
|