Encryption | scripts | source code
At present, the ASP (acive Server Pages) technology has been popular all over the world, on the internet almost everywhere can see its figure. It provides developers with intuitive, fast and efficient application development tools based on script, which greatly improves the development effect. By applying this technique, you can develop a professional dynamic Web site without having to do complex programming.
All things are advantageous to have the disadvantage, because because the ASP script is uses the clear text (plain text) way to write out, therefore the developer diligently develops the ASP application, once publishes to the running environment or delivers the user to use, it is very difficult to guarantee these "the source code" will not be spread out. How can we protect the ASP source code we developed?
Here we use a Microsoft-provided encryption Script program: SCRENC.EXE, this program can be downloaded from the author's website (http://www.zhengwei.net). This is a command tool that runs in DOS Promapt, which allows the scripting designer to encode the final script so that Web hosts and Web clients cannot view or modify their source code. One thing to note, though, is that the encrypted program requires the user's browser to use more than 5.0 versions of Internet Explorer. The completion of the encryption script becomes similar to the following:
The script encryption program encrypts only the script code, and the other contents of the file are not moved and are displayed in plain text. To use the Script encryption program, develop and debug the text in the usual way, and then use the utility to encrypt the final script. The Script encryption program uses tags in the source code to identify where the encryption started.
For Visual Basic scripting Edition (VBScript), the following example shows how to use a coded tag to display the copyright information for normal text:
In JScript, the encryption token is as follows:
When the script encryption program is invoked, the contents of the script block remain unchanged until the start tag, while the other content is encrypted. Therefore, if the start tag is omitted, all content within the script encoding block is encrypted, but if the start tag is at the end of the script cipher block, no content is encrypted.
After the code has occurred. You should know that the tag or <% ...%> tag contains valid HTML and inline script blocks. Applications that use this format include Microsoft? Internet Information Services (IIS). The recognized file name extension has. asp,. Asa and. CDX.
Html. The format consists of a text file that contains valid HTML and embedded script blocks. Applications written in this script format include Microsoft FrontPage?, Microsoft? Visual InterDev? And all virtual Web designers and browsers. The recognized file name extension has. htm and. html.
Plain text. The format consists of text files that contain only scripts and no two-sided markup. Applications written in this script format include Windows? Scripting Host (WSH) and Microsoft? Outlook?. The recognized file name extension has. js and. vbs, which, after encryption, become. JSE and. VBE respectively.
Script applet. The format consists of a text file that contains a valid script applet in the tag. The recognized file name extension has. SCT and. WSH.
Sample
The following is an example of using a script encryption program and a simple explanation of its results:
Encrypt input file test.html, generate output file encode.html, use:
Screnc test.html encode.html
Encrypt the input file test.htm and overwrite the input file with the encoded output file, using:
screnc/f test.htm
All in the current directory. The ASP file is encrypted and the encoded output file is placed in the C:\Temp, using:
Screnc *.asp C:\Temp
All in the current directory. The ASP file is encrypted and the encoded output file is placed in the C:\Temp, using:
screnc/e ASP *.* C:\Temp
Encrypt the input file test.htm and generate an output file encode.htm to ensure that script blocks that do not specify language properties use VBScript, using:
screnc/l VBScript test.htm encode.htm
Encrypt all script applet files in the current directory, overwriting them with encoded files without information display, using:
SCRENC/S/F *.SCT
Important: After coding, if you change the encrypted text, even if only one word change. The integrity of the script is lost and can no longer be used.