ASP Original code encryption tool introduction

Source: Internet
Author: User
Tags command line final html encode relative reserved valid microsoft frontpage
Encryption will always have a lot of ways to expose the original ASP program, resulting in the database password path can easily be other people get, so the implementation of the ASP program encryption processing is a good solution. Here's a tool to download if you are interested in coming to my homepage.
Minisql.yeah.net Lavender Paradise
A scripting encoder is a simple command-line tool that enables script designers to encode the final script so that Web hosts and Web clients cannot view or modify their source code. Note that this code only prevents others from accidentally looking at your code, and does not prevent a deliberate hacker from viewing your encoded content and its methods.
Web Designer in the Web page and server Active Sever pages (. ASP), enough to add all the features you can imagine on a Web page. In addition, Windows? Scripting Host (WSH) and many other applications are also scripted and have achieved the same results.

One drawback to using scripting so far is that it doesn't protect the intellectual property in scripts, nor does it guarantee that what you're seeing is what you create. Clever algorithms and well-designed scripts can always be seen completely because they are stored as plain text. Therefore, each level of script users can see the script designer's original code, and can remove, modify them, so as to their own. Obviously, if you're trying to get the upper hand in a competitive field, it's very bad for you.

With the introduction of script applet, protecting source code becomes more important. Scripting designers want to use this simple part hierarchy, but they don't necessarily want to share their source code with others. As long as the script is encoded, changing any part of the result file will make the script impossible to execute, thus guaranteeing the absolute integrity of your coded script.

The script encoder encodes only the script code, and the other contents of the file are not moved and are displayed in plain text. To use the Scripting Encoder, develop and debug the text in the usual way, and then use the utility to encode the final script. The script encoder uses tags in the source code to identify where the encoding begins.
For Visual Basic? Scripting Edition (VBScript), the following example shows how to use a coded tag to display copyright information for normal text:


<script language= "VBScript" >
' Copyright? 1998. XYZ Productions. All rights reserved.
' * * Start coding * *
' Put your code here.
</SCRIPT>

In JScript? , the encoding tag is as follows:

<script language= "JScript" >
The Copyright? 1998. ZYX Productions. All rights reserved.
* * Start Coding * *
Put your code here.
</SCRIPT>

When the script encoder is invoked, the contents of the script block remain unchanged before the start tag, while the other content is encoded. Therefore, if the start tag is omitted, all content within the script encoding block is encoded, but if the start tag is at the end of the script encoding block, no content is encoded.
After the code has occurred. You should know that the language indicator in the <SCRIPT> tag has changed. For VBScript, the new indicator is as follows:

<script language= "Vbscript.encode" >

For JScript (or JavaScript), the new indicator is as follows:
<script language= "Jscript.encode" >

The script encoder is called in the MS-DOS command line or the Run dialog box shown below:
Srcenc [Switches] Inputfile outputfile

Describe
Encode the script source code so that it is not easily viewed or modified by the user.

Grammar
Screnc [/S] [f] [/XL] [/L deflanguage] [/e defextension] inputfile outputfile

Part of the Script encoder syntax is as follows:

Partial description
/s optional. Switch that specifies that the script encoder's working state is static, resulting in no screen output. If omitted, the default is to provide redundant output.
/f is optional. Specifies that the input file will be overwritten by the output file. Note that this option destroys your original input source code. If omitted, the output file is not overwritten.

/XL is optional. Specifies that @language pseudo directives are not added to the. Top of ASP file. If omitted, @language instructions are added to all. ASP file.
/l Deflanguage Optional. Specifies the default scripting language (JScript) that is used in the encoding process. or VBScript). The script block in the encoded file, if it does not contain a language attribute, is considered written by the specified language. As omitted, JScript is the default language for HTML pages and Script applet, and VBScript is the default language for dynamic Web pages. For normal text files, the default scripting language is determined by the file name extension (. js or. vbs).
/e Defextension Optional. Associates an input file with a specific file type. This switch is used when the input file extension does not clearly display the file type, that is, when the input file name extension is not a recognized extension, but the file content can be classified as an identifiable type. This option is not a saved value. If a file with an unrecognized extension is encountered and the option is not specified, the script encoder cannot process the unrecognized file. The recognizable file extensions are ASA, ASP, CDX, HTM, html, JS, SCT, and VBS.
Inputfile is required. The name of the file to be encoded, including any required path information relative to the current directory.
OutputFile is required. The name of the output file to generate, including any required path information relative to the current directory.


Description
The following are four types of files that the scripting writer can handle:
Asp. This format consists of a text Dynamic Web page that contains valid HTML and embedded script blocks in the <SCRIPT> ... </SCRIPT> tag or <% ...%> tag. 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 encoding, become. JSE and. Vbe.
Script applet. The format consists of a text file that contains a valid script applet in the <SCRIPT> ... </SCRIPT> tag. The recognized file name extension has. SCT and. WSH.
Example
The following is an example of using a scripting encoder and a simple explanation of its results:
Encode input file test.html, generate output file encode.html, use:

Screnc test.html encode.html

Encodes the input file test.htm and overwrites the input file with the encoded output file, using:
screnc/f test.htm

All in the current directory. The ASP file is encoded 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 encoded and the encoded output file is placed in the C:\Temp, using:
screnc/e ASP *.* C:\Temp

Encodes the input file test.htm and generates 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

Encodes all script applet files in the current directory, overwriting the files with encoded files without information display, using:
SCRENC/S/F *.SCT


----------------------------------------------------------------------The following is a short example that contains JScript code that needs to be protected:
<HTML>
<HEAD>
<TITLE> Script Encoder Sample page </TITLE>
<script language= "JScript" >
<!--//
The Copyright? 1998 Microsoft Corporation. All Rights Reserved.
* * Start Coding * *
function Verifycorrectbrowser () {
if (navigator.appname = = "Microsoft Internet Explorer")
if (Navigator.appVersion.indexOf ("5.") >= 0)
return (true);
Else
return (false);
}
function Getappropriatepage () {
var str1 = "Had This been the actual Web site, a page compatible with";
var str2 = "browsers other than";
var str3 = "Microsoft Internet Explorer 5.0";
var STR4 = "would have been loaded.";
if (Verifycorrectbrowser ())
document.write (str1



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.