中文字幕免费精品_亚洲视频自拍_亚洲综合国产激情另类一区_色综合咪咪久久

vbs 加解密 for capicom
來源:易賢網 閱讀:1647 次 日期:2016-06-16 11:08:33
溫馨提示:易賢網小編為您整理了“vbs 加解密 for capicom”,方便廣大網友查閱!

代碼如下:

'******************************************************************************

'

' this code and information is provided as is without warranty of any kind,

' either expressed or implied, including but not limited to the implied

' warranties of merchantability and/or fitness for a particular purpose.

'

' copyright (c) 1999- 2002. microsoft corporation. all rights reserved.

'

'******************************************************************************

'

' cencrypt.vbs

'

' this is a sample script to illustrate how to use the capicom's encrypteddata

' to encrypt/decrypt text file.

'

' note: for simplicity, this script does not handle exception.

'

'******************************************************************************

option explicit

const forreading = 1, forwriting = 2

' command.

const unknown = 0

const encrypt = 1

const decrypt = 2

' capicom's constants.

const capicom_encryption_algorithm_rc2 = 0

const capicom_encryption_algorithm_rc4 = 1

const capicom_encryption_algorithm_des = 2

const capicom_encryption_algorithm_3des = 3

const capicom_encryption_algorithm_aes = 4

const capicom_encryption_key_length_maximum = 0

const capicom_encryption_key_length_40_bits = 1

const capicom_encryption_key_length_56_bits = 2

const capicom_encryption_key_length_128_bits = 3

const capicom_encryption_key_length_192_bits = 4

const capicom_encryption_key_length_256_bits = 5

' command line arguments.

dim command : command = unknown

dim password : password = null

dim algorithm : algorithm = capicom_encryption_algorithm_rc2

dim keylength : keylength = capicom_encryption_key_length_maximum

dim verbose : verbose = false

dim filenames()

' first make sure the script is executed by cscript.exe.

if instr(1, ucase(wscript.fullname), cscript.exe, vbtextcompare) = 0 then

wscript.echo this script can only be executed by cscript.exe. & vbcrlf & vbcrlf &_

you can either: & vbcrlf & vbcrlf & _

1. set cscript.exe as the default (run cscript //h:cscript), or & vbcrlf & _

2. run cscript.exe directly as in, cscript & wscript.scriptname & .

wscript.quit(-1)

end if

' parse the command line.

parsecommandline

' now process the command.

select case command

case encrypt

doencryptcommand filenames, algorithm, keylength, password

case decrypt

dodecryptcommand filenames, password

end select

wscript.quit(0)

' end main

'******************************************************************************

'

' subroutine: doencryptcommand

'

' synopsis : encrypt content of text file filenames(0).

'

' parameter : filenames - array of filenames.

'

' algorithm - encryption algorithm

'

' keylength - key size.

'

' password - secret password.

'

'******************************************************************************

sub doencryptcommand (filenames, algorithm, keylength, password)

dim content

dim message

dim encrypteddata

' create the encrypteddata object.

set encrypteddata = createobject(capicom.encrypteddata)

' set algorithm, key size, and encryption password.

encrypteddata.algorithm.name = algorithm

encrypteddata.algorithm.keylength = keylength

encrypteddata.setsecret password

' display main title.

wscript.stdout.writeline encrypting text file & filenames(0) & .

wscript.stdout.writeline

' display more detail for verbose operation.

if verbose then

displaydetail encrypteddata

end if

' load content of text file to be encrypted.

loadfile filenames(0), content

' now encrypt it.

encrypteddata.content = content

message = encrypteddata.encrypt

' finally, save encrypted message to filenames(1).

savefile filenames(1), message

wscript.stdout.writeline successful - encrypted message saved to & filenames(1) & .

' free resources.

set encrypteddata = nothing

end sub ' end doencryptcommand

'******************************************************************************

'

' subroutine: dodecryptcommand

'

' synopsis : decrypt an encrypted file.

'

' parameter : filenames - array of filenames.

'

' password - secret password.

'

'******************************************************************************

sub dodecryptcommand (filenames, password)

dim message

dim encrypteddata

' create the encrypteddata object.

set encrypteddata = createobject(capicom.encrypteddata)

' set decryption password.

encrypteddata.setsecret password

' display main title.

wscript.stdout.writeline decrypting encrypted text file & filenames(0) & .

wscript.stdout.writeline

' load the encrypted message.

loadfile filenames(0), message

' now decrypt it.

encrypteddata.decrypt(message)

' display more detail for verbose operation.

if verbose then

displaydetail encrypteddata

end if

' finally, save decrypted content to filenames(1).

savefile filenames(1), encrypteddata.content

wscript.stdout.writeline successful - decrypted content saved to & filenames(1) & .

' free resources.

set encrypteddata = nothing

end sub ' end dodecryptcommand

'******************************************************************************

'

' subroutine: loadfile

'

' synopsis : read content of a text file.

'

' parameter : filename - input text filename.

'

' buffer - string buffer to receive the text file content.

'

'******************************************************************************

sub loadfile (filename, buffer)

dim fso

set fso = createobject(scripting.filesystemobject)

if not fso.fileexists(filename) then

wscript.stdout.writeline error: file & filename & not found.

wscript.quit(-5)

end if

dim ts

set ts = fso.opentextfile(filename, forreading)

buffer = ts.readall

end sub ' end loadfile

'******************************************************************************

'

' subroutine: savefile

'

' synopsis : save string to file.

'

' parameter : filename - output filename.

'

' buffer - string buffer to be saved.

'

'******************************************************************************

sub savefile (filename, buffer)

dim fso

set fso = createobject(scripting.filesystemobject)

dim ts

set ts = fso.opentextfile(filename, forwriting, true)

ts.write buffer

end sub ' end savefile

'******************************************************************************

'

' subroutine: displaydetail

'

' synopsis : display detail information.

'

' parameter : encrypteddata - encrypteddata object.

'

'******************************************************************************

sub displaydetail (encrypteddata)

dim algonames(4)

algonames(0) = rc2

algonames(1) = rc4

algonames(2) = des

algonames(3) = 3des

algonames(4) = aes

wscript.stdout.writeline algorithm : & algonames(encrypteddata.algorithm.name)

wscript.stdout.write key length:

select case encrypteddata.algorithm.keylength

case capicom_encryption_key_length_40_bits

wscript.stdout.writeline 40 bits

case capicom_encryption_key_length_56_bits

wscript.stdout.writeline 56 bits

case capicom_encryption_key_length_128_bits

wscript.stdout.writeline 128 bits

case capicom_encryption_key_length_192_bits

wscript.stdout.writeline 192 bits

case capicom_encryption_key_length_256_bits

wscript.stdout.writeline 256 bits

case else

wscript.stdout.writeline maximum

end select

wscript.stdout.writeline

end sub ' end displaydetail

'******************************************************************************

'

' subroutine: parsecommandline

'

' synopsis : parse the command line, and set the options accordingly.

'

' parameter : none

'

'******************************************************************************

sub parsecommandline

' constants for command line parsing states.

const arg_state_command = 0

const arg_state_options = 1

const arg_state_algorithm = 2

const arg_state_length = 3

const arg_state_filename = 4

const arg_state_password = 5

const arg_state_end = 6

' parse command line.

dim arg

dim argstate : argstate = arg_state_command

for each arg in wscript.arguments

select case argstate

case arg_state_command

select case ucase(arg)

case encrypt

command = encrypt

case decrypt

command = decrypt

case else

displayusage

end select

argstate = arg_state_options

case arg_state_options

select case ucase(arg)

case -alg, /alg

argstate = arg_state_algorithm

case -length, /length

argstate = arg_state_length

case -v, /v

verbose = true

case -?, /?

displayusage

case else

if left(arg, 1) = - or left(arg, 1) = / then

displayusage

else

redim filenames(0)

filenames(0) = arg

end if

argstate = arg_state_filename

end select

case arg_state_algorithm

if left(arg, 1) = - or left(arg, 1) = / then

displayusage

else

select case ucase(arg)

case rc2

algorithm = capicom_encryption_algorithm_rc2

case rc4

algorithm = capicom_encryption_algorithm_rc4

case des

algorithm = capicom_encryption_algorithm_des

case 3des

algorithm = capicom_encryption_algorithm_3des

case aes

algorithm = capicom_encryption_algorithm_aes

case else

displayusage

end select

end if

argstate = arg_state_options

case arg_state_length

if left(arg, 1) = - or left(arg, 1) = / then

displayusage

else

select case ucase(arg)

case 40

keylength = capicom_encryption_key_length_40_bits

case 56

keylength = capicom_encryption_key_length_56_bits

case 128

keylength = capicom_encryption_key_length_128_bits

case 192

keylength = capicom_encryption_key_length_192_bits

case 256

keylength = capicom_encryption_key_length_256_bits

case max

keylength = capicom_encryption_key_length_maximum

case else

displayusage

end select

end if

argstate = arg_state_options

case arg_state_filename

if left(arg, 1) = - or left(arg, 1) = / then

displayusage

else

redim preserve filenames(ubound(filenames) + 1)

filenames(ubound(filenames)) = arg

end if

argstate = arg_state_password

case arg_state_password

if left(arg, 1) = - or left(arg, 1) = / then

displayusage

else

password = arg

end if

argstate = arg_state_end

case else

wscript.stdout.writeline internal script error: unknown argument state ( & cstr(argstate) & ) encountered.

wscript.quit(-3)

end select

next

' make sure we are in good state.

if argstate <> arg_state_end then

displayusage

end if

end sub ' parsecommandline

'******************************************************************************

'

' subroutine: displayusage

'

' synopsis : display the usage screen, and then exit with a negative error

' code.

'

' parameter : none.

'

'******************************************************************************

sub displayusage

select case command

case unknown

wscript.stdout.writeline usage: cencrypt command [options] infile outfile password

wscript.stdout.writeline

wscript.stdout.writeline command:

wscript.stdout.writeline

wscript.stdout.writeline encrypt -- encrypt a text file

wscript.stdout.writeline decrypt -- decrypt an encrypted text file

wscript.stdout.writeline

wscript.stdout.writeline for help on a specific command, enter cencrypt command -?

case encrypt

wscript.stdout.writeline usage: cencrypt encrypt [options] contentfile encryptedfile password

wscript.stdout.writeline

wscript.stdout.writeline the encrypt command is used to encrypt a text file based on a secret password.

wscript.stdout.writeline encrypting protects the data from being read by others except those who know

wscript.stdout.writeline the secret password.

wscript.stdout.writeline

wscript.stdout.writeline options:

wscript.stdout.writeline

wscript.stdout.writeline -alg <algorithm> -- rc2, rc4, des, 3des, or aes (default to rc2)

wscript.stdout.writeline -length <key length> -- 40, 56, 128, 192, 256, or max (default to max,

wscript.stdout.writeline and ignored for des or 3des)

wscript.stdout.writeline -v -- verbose operation

wscript.stdout.writeline -? -- this help screen

wscript.stdout.writeline

wscript.stdout.writeline contentfile -- text file to be encrypted

wscript.stdout.writeline

wscript.stdout.writeline encryptedfile -- encrypted text file

wscript.stdout.writeline

wscript.stdout.writeline note: all non-fatal invalid options for this specific command will be ignored.

wscript.stdout.writeline

case decrypt

wscript.stdout.writeline usage: cencrypt decrypt [options] encryptedfile contentfile password

wscript.stdout.writeline

wscript.stdout.writeline the decrypt command is used to decrypt an encrypted text file.

wscript.stdout.writeline

wscript.stdout.writeline options:

wscript.stdout.writeline

wscript.stdout.writeline -v -- verbose operation

wscript.stdout.writeline -? -- this help screen

wscript.stdout.writeline

wscript.stdout.writeline encryptedfile -- encrypted text file

wscript.stdout.writeline

wscript.stdout.writeline contentfile -- decrypted text file

wscript.stdout.writeline

wscript.stdout.writeline note: all non-fatal invalid options for this specific command will be ignored.

wscript.stdout.writeline

case else

wscript.stdout.writeline internal script error: unknown help state (command = & cstr(command) & ).

wscript.quit(-2)

end select

wscript.quit(-1)

end sub ' end displayusage

更多信息請查看腳本欄目
易賢網手機網站地址:vbs 加解密 for capicom
由于各方面情況的不斷調整與變化,易賢網提供的所有考試信息和咨詢回復僅供參考,敬請考生以權威部門公布的正式信息和咨詢為準!

2026上岸·考公考編培訓報班

  • 報班類型
  • 姓名
  • 手機號
  • 驗證碼
關于我們 | 聯系我們 | 人才招聘 | 網站聲明 | 網站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點 | 投訴建議
工業和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網安備53010202001879號 人力資源服務許可證:(云)人服證字(2023)第0102001523號
云南網警備案專用圖標
聯系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關注公眾號:hfpxwx
咨詢QQ:1093837350(9:00—18:00)版權所有:易賢網
云南網警報警專用圖標
中文字幕免费精品_亚洲视频自拍_亚洲综合国产激情另类一区_色综合咪咪久久
99精品99久久久久久宅男| 久久精品国产精品亚洲| 欧美二区不卡| 欧美精品在线免费播放| 欧美极品在线观看| 欧美日韩欧美一区二区| 欧美日韩视频不卡| 欧美午夜女人视频在线| 国产精品自拍网站| 国内精品久久久久影院色 | 久久久亚洲精品一区二区三区 | 国产一区二区精品| 黄色日韩在线| 亚洲免费黄色| 欧美一区二区私人影院日本| 久久精品国产99| 欧美日韩一区二区三区在线| 国产精品女主播一区二区三区| 国精产品99永久一区一区| 亚洲国产天堂网精品网站| 亚洲一级黄色片| 鲁大师成人一区二区三区| 国产精品国产三级国产aⅴ入口| 国模精品一区二区三区| 在线亚洲一区二区| 欧美极品在线视频| 一色屋精品视频在线观看网站| 蜜臀91精品一区二区三区| 国产精自产拍久久久久久| 日韩视频在线观看| 欧美福利在线观看| 在线不卡视频| 久久久久亚洲综合| 国产一区成人| 久久精品国产亚洲精品| 国产精品久久久免费| 一区二区三区四区国产精品| 欧美精品亚洲精品| 尤物99国产成人精品视频| 亚洲男人的天堂在线| 欧美午夜精品理论片a级按摩 | 国产欧美日韩亚洲一区二区三区| 最新日韩精品| 欧美日韩高清在线| 亚洲一级黄色av| 麻豆av一区二区三区| 黄色成人91| 性欧美大战久久久久久久久| 国产精品一二一区| 先锋影音国产精品| 极品av少妇一区二区| 久久在线免费视频| 一本色道久久99精品综合| 国产精品久久久久久超碰| 欧美一区二区三区免费观看| 激情久久久久久| 欧美精品国产精品| 小处雏高清一区二区三区| 亚洲国产精品久久| 国产美女精品视频| 欧美在线亚洲| 亚洲精品国精品久久99热| 欧美性一区二区| 亚洲欧美日韩成人| 亚洲美女区一区| 激情综合激情| 国产精品揄拍500视频| 麻豆av一区二区三区| 亚洲一区精品视频| 亚洲欧洲精品一区二区三区| 国产午夜久久久久| 欧美日韩综合视频网址| 欧美成人一品| 美日韩丰满少妇在线观看| 久久狠狠久久综合桃花| 亚洲欧洲av一区二区| aa成人免费视频| 亚洲视频在线观看三级| 91久久夜色精品国产九色| 伊人一区二区三区久久精品| 国产裸体写真av一区二区| 国产精品mv在线观看| 国产精品盗摄久久久| 欧美日韩国产另类不卡| 欧美午夜宅男影院在线观看| 国产精品久久久久久久久果冻传媒| 欧美性大战久久久久| 国产精品天天摸av网| 国内精品视频一区| 1769国产精品| 一区二区三区精品| 亚洲人在线视频| 亚洲美女在线国产| 午夜视频一区二区| 久久人人97超碰国产公开结果| 欧美成人a∨高清免费观看| 欧美日韩伊人| 在线日本成人| 亚洲欧美色一区| 欧美人与禽性xxxxx杂性| 国产精品无码专区在线观看| 在线日韩av永久免费观看| 中日韩在线视频| 欧美激情 亚洲a∨综合| 亚洲国产精品一区二区www在线| 欧美一区二区私人影院日本| 国产精品国产a| 99精品免费视频| 免播放器亚洲| 国产精品毛片一区二区三区| 亚洲激情影视| 免费成人高清| 亚洲高清激情| 久久人人97超碰精品888| 国产精品日韩在线一区| 亚洲精品综合在线| 欧美va天堂va视频va在线| 国产一区二区剧情av在线| 亚洲欧美日韩成人| 国产精品日日摸夜夜摸av| 亚洲视频在线看| 国产精品国产自产拍高清av| 亚洲精品日韩综合观看成人91| 午夜精彩视频在线观看不卡| 欧美日韩在线视频一区| 亚洲精品免费在线播放| 欧美xx视频| 亚洲精品日本| 欧美午夜视频一区二区| 亚洲先锋成人| 在线看一区二区| 国产精品视频自拍| 欧美理论大片| 六十路精品视频| 亚洲精选视频在线| 国产日韩精品在线播放| 亚洲欧美日韩精品久久亚洲区| 欧美日韩国产系列| 亚洲午夜电影网| 国产老女人精品毛片久久| 久久精品人人做人人爽| 亚洲第一黄色网| 欧美日韩中文在线| 亚洲男人av电影| 亚洲大片一区二区三区| 欧美顶级艳妇交换群宴| 久久人人九九| 老司机免费视频久久| 欧美中文字幕在线播放| 亚洲在线观看免费| 在线观看国产成人av片| 国产日韩精品在线| 狠狠色狠狠色综合日日tαg| 国产精品久久久久久亚洲毛片| 欧美日韩mv| 国产精品日本精品| 国产一区白浆| 亚洲精品国精品久久99热一| 亚洲精品国产精品国产自| 日韩亚洲欧美一区二区三区| 一区二区三区波多野结衣在线观看| 日韩视频在线免费| 午夜精品影院| 久久夜色精品国产欧美乱极品| 久久爱另类一区二区小说| 久久亚洲精品视频| 欧美日韩国产精品专区| 国产欧美日韩综合一区在线观看 | 久久久蜜桃精品| 欧美顶级艳妇交换群宴| 欧美日韩亚洲综合| 国产日本欧美一区二区| 精品9999| 欧美一区国产二区| 欧美激情一区二区三区四区| 欧美四级在线| 亚洲日本aⅴ片在线观看香蕉| 亚洲欧美国产毛片在线| 蜜桃精品久久久久久久免费影院| 国产精品成人一区二区三区夜夜夜| 国产综合欧美| 亚洲欧美激情四射在线日| 欧美成人激情视频免费观看| 国产精品日韩欧美一区二区三区| 亚洲国产成人一区| 久久一二三国产| 国产亚洲人成网站在线观看| 亚洲一二区在线| 国产精品第13页| 亚洲午夜久久久久久久久电影院| 欧美精品久久久久久久免费观看| 国内伊人久久久久久网站视频| 亚洲午夜精品福利| 国产精品看片你懂得| 亚洲欧美日韩视频二区| 国产精品久久久久影院色老大| 亚洲免费在线观看视频| 国产精品永久入口久久久| 欧美一区二区视频在线| 好吊一区二区三区|