|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Programmer's Guide > Encrypted scripts |
available from build: 20050602 |
Scripts with the file name ending with the sequence ### ( 3 sharp charactes ) are interpreted and managed as Encrypted Scripts.
An Encrypted Script is a valid .VBS script processed by the special program DBWEncryptScript.EXE, available and delivered with DBWorks sp1.0 in the BIN sub-directory of the installation path.
Encrypted Scripts may be useful whenever you need to use special passwords in the script, or when you need to expose special file access methods ( like DBWServer direct calls, for example ) that must be strictly reserved and not public.
The encryption keys are hard-coded in the DBWorks executables, and not accessable to anyone, included the Administrator that will encrypt the scripts.
When executing the Encrypted Scripts, no decrypted temporary files are created, being the whole process in-memory.
The DBWEncryptScript command has the following syntax:
DBWEncryptScript [InputScriptFileName [OutputScriptFileName]]
If no parameters are passed, DBWEncryptScript asks for the full path name of the script to be encrypted, and creates an encrypted script with the same file name, in the same directory, but ending with ### ( three sharp characters ).
If only the InputScriptFileName parameter is passed, DBWEncryptScript creates an encrypted script with the same file name, in the same directory, but ending with ### ( three sharp characters ).
If both the InputScriptFileName and the OutputScriptFileName parameters are passed, DBWEncryptScript creates silently the encrypted script with the assigned name; the sequence ### will be appended automatically at the end of the file name.
Original not encrypted script: TEST.VBS
Sub main()
DBWinit(true)
DBWMsgBox "Hello, encrypted world!"
End Sub
Apply the command:
DBWEncryptScript "C:\Program Files\DBWorks\LST\test.vbs" "C:\Program Files\DBWorks\LST\test.vbs"
Resulting encrypted script: TEST###.VBS
14d2b2b633a25072177a19
61c1debd70e7cdce6afd0fb414a4
4d25a02f13fb5156aea06a11c4573ba26d7e956852cd8ef86457cd07067f1c4804
a3499f5040056c