最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

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

 更新時(shí)間:2011年02月26日 23:40:53   作者:  
有時(shí)候自己寫了VBS又怕共享后別人盜用你的源碼呢?這里提供了VBS程序源碼加密的方法。
用法:

1.copy下面代碼至文本文檔
2.將文件后綴名改為.vbs
3.雙擊運(yùn)行
復(fù)制代碼 代碼如下:

Ans = InPutBox("請(qǐng)輸入要執(zhí)行的操作: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下使用,原因可以參考http://m.fzitv.net/article/26390.htm因?yàn)槟莻€(gè)選擇文件功能不能使用而已,下面我們修改下,讓他支持win2000,win2003系統(tǒng),我們可以通過拖動(dòng)文件到這個(gè)vbs上即可。
腳本之家修改的加強(qiáng)版本
復(fù)制代碼 代碼如下:

If WScript.Arguments.Count=0 Then WScript.Quit
strLoadFile=WScript.Arguments(0)
Ans = InPutBox("請(qǐng)輸入要執(zhí)行的操作: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

相關(guān)文章

最新評(píng)論

南安市| 岳阳市| 平泉县| 丹凤县| 环江| 西丰县| 桂平市| 巴楚县| 涞源县| 南和县| 巨鹿县| 白朗县| 中江县| 仲巴县| 金阳县| 肇庆市| 蓬安县| 孝感市| 长沙县| 闽侯县| 珲春市| 营口市| 永登县| 奉化市| 清水河县| 垦利县| 新绛县| 永平县| 永福县| 阿拉善左旗| 鹤山市| 乌拉特中旗| 新巴尔虎右旗| 华坪县| 涿鹿县| 十堰市| 体育| 濮阳县| 浠水县| 凤凰县| 房山区|