中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 20:34
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » Encrypt VBS with VBS
Printable Version  6,385 / 17
Floor1 zhoushijay Posted 2007-07-11 14:22
高级用户 Posts 375 Credits 845
```
set fso=createobject("scripting.filesystemobject")

scf=inputbox("Please enter the script file name to encrypt","VBS Encryption Program","*.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"
msgbox "Encryption successful",,"¥Ye Qi Production¥"
```
Floor2 wudixin96 Posted 2007-07-11 14:27
银牌会员 Posts 931 Credits 1,928
Produced by Ye Qi?

Isn't it originally created by Brother zhoushijay?
Floor3 zhoushijay Posted 2007-07-11 15:11
高级用户 Posts 375 Credits 845
Ye Qi is my QQ name
Floor4 wudixin96 Posted 2007-07-11 15:22
银牌会员 Posts 931 Credits 1,928
Sorry, I shouldn't have doubted Brother zhoushijay. :-)
Floor5 willsion Posted 2007-07-11 18:01
高级用户 Posts 312 Credits 793
Not bad, learn something.
Floor6 zh159 Posted 2007-07-12 01:20
金牌会员 Posts 1,467 Credits 3,687
It's cumbersome to input the script file name. Here's a modified one for selecting and inputting the script file:

Floor7 gzxinxinxin Posted 2007-07-12 18:47
新手上路 Posts 2 Credits 3
Amazing, all are experts.
Floor8 YunEr Posted 2007-07-12 20:49
新手上路 Posts 4 Credits 10
Why are there no comments at all?......The program should have necessary comments....
Floor9 zh159 Posted 2007-07-12 22:37
金牌会员 Posts 1,467 Credits 3,687
Why must there be comments? Moreover, it's not that every line can be clearly commented.
Floor10 hdzc Posted 2007-10-07 22:35
初级用户 Posts 86 Credits 146
Floor11 uiopuiop Posted 2007-10-07 22:43
中级用户 Posts 211 Credits 400
That's good. It's different from the command-line encryption provided by Microsoft. Can you post the decryption one?
Floor12 huzixuan Posted 2007-11-10 10:50
高级用户 Posts 219 Credits 537 From 芜湖
Oh, got it. msgbox runner

[ Last edited by huzixuan on 2007-11-10 at 11:31 AM ]
Floor13 cooray Posted 2007-11-10 12:54
初级用户 Posts 34 Credits 71
UserAccounts.CommonDialog
Not bad, learned another trick ;)
Floor14 caman20 Posted 2007-11-16 19:19
新手上路 Posts 2 Credits 4
Oh, what a bummer! I encrypted a file without backing it up just now.
Floor15 wuxj Posted 2007-11-18 22:45
初级用户 Posts 25 Credits 50
UserAccounts.CommonDialog
This can only be used in XP, not very universal.
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023