标题: [原创] 【加密】VBS简易加密工具 [打印本页]
作者: batman 时间: 2011-6-19 02:46 标题: 【加密】VBS简易加密工具
本帖最后由 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"
复制代码
作者: batman 时间: 2011-6-19 02:58
附上一个本人写的创建bathome桌面快捷方式vbs的加密版:- 'Set%20ws%20%3D%20CreateObject%28%22WScript.Shell%22%29%0D%0ADesktopPath%20%3D%20ws.SpecialFolders%28%22Desktop%22%29%0D%0ASet%20url%20%3D%20ws.CreateShortcut%28DesktopPath%20%26%20%22%5Cbathome.url%22%29%0D%0Aurl.TargetPath%20%3D%20%22http%3A//www.bathome.net/%22%0D%0Aurl.Save%0D%0ASet%20url%20%3D%20Nothing%20%0D%0ASet%20ws%20%3D%20Nothing%20
- Dim FSO, SHELL, VbStr, Temp
- Set FSO = CreateObject("scripting.filesystemobject")
- Temp = FSO.GetSpecialFolder(2)
- VbStr = FSO.OpenTextFile(WScript.ScriptName).ReadLine
- VbStr = unescape(Mid(VbStr, 2, Len(VbStr)))
- FSO.OpenTextFile(Temp & "t_temp.vbs", 2 , True).Write VbStr
- CreateObject("wscript.shell").run Temp & "t_temp.vbs", True, True
- FSO.DeleteFile(Temp & "t_temp.vbs")
- Set FSO = Nothing
复制代码
欢迎光临 批处理之家 (http://bathome.net./) |
Powered by Discuz! 7.2 |