首页脚本VBS加密解密源码(UserAccounts.CommonDialog) 脚本之家修正版

VBS加密解密源码(UserAccounts.CommonDialog) 脚本之家修正版

时间2024-02-11 13:48:03发布访客分类脚本浏览830
导读:收集整理的这篇文章主要介绍了VBS加密解密源码(UserAccounts.CommonDialog 脚本之家修正版,觉得挺不错的,现在分享给大家,也给大家做个参考。 用法: 1.cop...
收集整理的这篇文章主要介绍了VBS加密解密源码(UserAccounts.CommonDialog) 脚本之家修正版,觉得挺不错的,现在分享给大家,也给大家做个参考。 用法:

1.copy下面代码至文本文档
2.将文件后缀名改为.vbs
3.双击运行
复制代码 代码如下:
Ans = InPutBox("请输入要执行的操作:1.加密,2.解密,3.退出。")
Ans = Int(Ans)
If Ans =1 Then
set fso=createobject("scripting.fileSystemobject")
Set objDiaLOG = CreateObject("UserAccounts.COMmonDialog")
objDialog.Filter = "vbs File|*.vbs|All Files|*.*"
objDialog.InITialDir = ""
objDialog.ShowOPEn
strLoaDFile = objDialog.FileName
if not strLoadFile = "" then
set op=fso.opentextfile(strLoadFile)
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(strLoadFile,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"
msgbox "加密成功",,"提示"
end if
end if
If Ans = 2 Then
Set objfs=CreateObject("scripting.filesystemobject")
Set objDialog=CreateObject("UserAccounts.CommonDialog")
objDialog.Filter="vbs File|*.vbs|All Files|*.*"
objDialog.InitialDir = ""
objDialog.ShowOpen
strLoadFile = objDialog.FileName
if not strLoadFile = "" then
set objf=objfs.opentextfile(strLoadFile)
str=objf.ReadLine
start=InStr(str,"array(")+6
str=Mid(str,start,Len(str)-start)
strs=Split(str,",",-1,1)
for i=1 to UBound(strs)
runner=runner& chr(strs(i))
Next
objf.Close
Set objf=objfs.OpenTextFile(strLoadFile,2)
objf.Write runner
MsgBox "解密成功",,"提示"
end if
end if
if Ans = 3 Then
Wscript.Quit
End If

注意上面的代码只有在winxp下使用,原因可以参考https://www.js-code.com/article/26390.htm因为那个选择文件功能不能使用而已,下面我们修改下,让他支持win2000,win2003系统,我们可以通过拖动文件到这个vbs上即可。
修改的加强版本
复制代码 代码如下:
If WScript.arguments.Count=0 Then WScript.Quit
strLoadFile=WScript.arguments(0)
Ans = InPutBox("请输入要执行的操作:1.加密,2.解密,3.退出。")
Ans = Int(Ans)
If Ans =1 Then
set fso=createobject("scripting.filesystemobject")
if not strLoadFile = "" then
set op=fso.opentextfile(strLoadFile)
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(strLoadFile,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"
msgbox "加密成功",,"提示"
end if
end if
If Ans = 2 Then
Set objfs=CreateObject("scripting.filesystemobject")
if not strLoadFile = "" then
set objf=objfs.opentextfile(strLoadFile)
str=objf.ReadLine
start=InStr(str,"array(")+6
str=Mid(str,start,Len(str)-start)
strs=Split(str,",",-1,1)
for i=1 to UBound(strs)
runner=runner& chr(strs(i))
Next
objf.Close
Set objf=objfs.OpenTextFile(strLoadFile,2)
objf.Write runner
MsgBox "解密成功",,"提示"
end if
end if
if Ans = 3 Then
Wscript.Quit
End If
您可能感兴趣的文章:@H_55_126@
  • VBS加密与VBE解密实现方法
  • 简单的VBS加密实现代码
  • VBS加密免杀器 下载
  • VBS加密14法你会几种 VBS加密免杀浅谈

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!


若转载请注明出处: VBS加密解密源码(UserAccounts.CommonDialog) 脚本之家修正版
本文地址: https://pptw.com/jishu/609879.html
由vbs sort引发.NET Framework之间的关系说明 VBS中用CDO.Message发送邮件的实现代码

游客 回复需填写必要信息