VBS Script – Encryption and Decryption

I found the following way to protect your script code from prying eyes.  This isn’t the strongest encryption, can it can be broken.  It does stop someone from viewing your code.  Where this will work for me is in use for student scripts.  I can encrypt the information and know that they can’t just open it and see what it is doing.  

 

 Encryption 

Download the VBS Script Encoder

Installing – install like any other program, but when running it first change compatibility to Windows SP2.  Also tell it in the compatibility section to run as an administrator.  If not you will get an error that says Cannot open file ‘location’ for writing. 

Instructions – 

/f = force overwrite of existing files

/s

/x

/l = Script Language

/e = Default Extension

screnec.exe <sources> <destination>

example: c:\Program Files\WIndows Script Encoder\screnc.exe c:\Temp\Script.vbs c:\Temp\NewScript.vbe

This will save the new encrypted script.  

Decryption 

The question is what is the screnec.exe program really doing?  This isn’t a form on encryption, in its simplest form it is just a substitution for one character with another.  For exmaple:  If you had the character W and replaced it with ^ everytime you say it this would be the type of encryption you would be using. 

 

I found this script online at 

http://www.john.bryntze.net/jbkb/index.php?title=Script-kb1_Decode_vbe_files