Download
for Windows

Manuals

Script Encoder Plus

Version: 3.0.3.9

Table Of Contents

 

Introduction

Script Encoder Plus is a tool for developers seeking to scramble or obfuscate their classic ASP, HTML, as well as JScript and VBScript running under the Windows Script Host. Developers can also benefit from Script Encoder Plus ability to obfuscate or minify client-side HTML, JavaScript, and CSS. This tool can also minify classic C and C++ source code. On top of this, the Script Encoder Plus still supports Windows Script Encoder method (originally provided by Microsoft's screnc tool.)

Screencasts

Watch the following screencasts where we walk you through the basic operation of the Script Encoder Plus:

Main Features

Script Encoder Plus provides the following options:

  • Obfuscation (or scrambling) of JavaScript, JScript, VBScript standalone files.
  • Obfuscation (or scrambling) of classic ASP files that may contain HTML markup, with VBScript & JScript blocks inside.
  • Obfuscation (or scrambling) of HTML and HTML-type files that may include JavaScript, JScript, VBScript blocks inside.
  • Scrambling of JavaScript, JScript, VBScript code in a file, or embedded in classic ASP or HTML pages using Windows Script Encoder method (emulation of the screnc.exe tool by Microsoft.)
  • Script Encoder Plus fully emulates and surpasses the capabilities of the original Script Encoder, or screnc tool from Microsoft.
  • Script Encoder Plus is currently developed and fully supported to run on the latest operating systems (unlike discontinued screnc from Microsoft.)
  • Minification, compression (reduction in size) of HTML, classic ASP, JScript, VBScript without obfuscation.
  • Flexible settings for obfuscation that allow to fine-tune levels of scrambling.
  • Runs with a GUI interface that allows to preview 'Before' and 'After' scripts to see the results of obfuscation and more.
  • Ability to preview obfuscated page and compare it with original document.
  • Special tools to locate parts of code between the original and scrambled scripts.
  • Scrambling of C/C++/MFC source code files into solid code chunks making them hard to view or edit.
  • Checking of missing and/or extra semicolons in JavaScript, and JScript code.
  • Support for built-in function to check correctness of JScript and VBScript code.
  • Support for international code pages and file encodings (overall Unicode/UTF-8 support.)
  • Ability to change code page and file encoding while saving a script.
  • Ability to make a Linux-compatible script file (with a single line-feed at the end of lines.)
  • Command line support, for expansion of the GUI functionality & batch conversion.
  • Support for batch conversion of entire folders using command line & more.

To learn more, please read on, or watch the screencasts.

Interface and Operation

Script Encoder Plus employs user interface with simple navigational controls and two main windows to show the code Before and After conversion:

Screen shot of the Script Encoder Plus

To begin you have to either open an existing script file, type, or paste a script into Before window. Script Encoder Plus can work with the following script types:

  • HTML or HTML-type mark-up files, like classic ASP (that may include JavaScript/JScript/VBScript and CSS blocks - other scripting languages are left intact and not obfuscated.)
  • JavaScript/JScript and VBScript standalone files.
  • C source code files.
  • C++/MFC source code files.

Right after you open a file Script Encoder Plus will attempt to determine its type in 'Before' window. You can also do so manually, or correct its automatic assumption. This selection is crucial for the conversion since all of the abovementioned file types are converted differently.

Before making a conversion set the following options for it. First select the type of operation you'd like to perform:

  • Scramble - will obfuscate (scramble) code in Before window. If it is HTML code containing JavaScript or VBScript blocks they will be also obfuscated according to selection. (Any unrecognized scripting languages will be left without changes.)
  • Organize - will organize (de-scramble) code in Before window making it easy to read and edit. (This feature is available in the Premium version only. To learn more, go to Help -> Get Premium Version in the main menu.)
  • No Changes - will not alter the script in Before window, but may allow applying of other options.

Then select type of End of Lines in the respective section:

  • CR+LF (\r\n) - stands for Carriage Return and Line Feed. Use this option to make a Microsoft-compatible script file. (This option is mostly used for script's readability on a Windows platform.)
  • LF only (\n) - use this selection to make a Unix-compatible file. At this time many browsers understand this encoding, so choosing it will not only make the code less readable but also smaller in size.
  • CR only (\r) - use this selection to convert all line-feeds to Carriage Return only symbols.

Then select HTML scrambling options in the HTML section:

  • Escape tags - when checked will make Script Encoder Plus use escape sequences to scramble appropriate HTML tags. (There are more options available for this selection - see Conversion Properties below.)
  • Escape text - when checked will make Script Encoder Plus use escape sequences in the text within HTML code that is located outside of tags. This option will render document's HTML code almost unreadable by a human eye. (There are more options available for this selection - see Conversion Properties below.)
  • Random escape - when checked will make Script Encoder Plus use escape sequences in a random fashion for better obfuscation. (There are more options available for this selection - see Conversion Properties below.)

Then select JavaScript/VBScript scrambling options in the Script section:

  • Encode script - when checked will make Script Encoder Plus apply Windows Script Encoder method to JavaScript and VBScript blocks within current HTML/classic ASP file, or to the whole document if it's opened as JavaScript or VBScript. (This option employs emulation of encoding of JScript/VBScript originally performed by Microsoft® Script Encoder screnc.exe, Microsoft® Corporation.) WARNING: Use this option to obfuscate your server-side scripts only. As of Internet Explorer 9 the Windows Script Encoder method is no longer supported for the client-side scripts. To prevent a certain code block from being encoded use SENoEnc="1" command in the <SCRIPT> tag as shown in this example:
      <SCRIPT language="JavaScript" type="text/javascript" SENoEnc="1"> ... </SCRIPT>
  • Escape Quotes - when checked will make Script Encoder Plus use escape sequences in JavaScript quotes. This will dramatically decrease readability of your code. (There are more options available for this selection - see Conversion Properties below.)
  • Escape Code - when checked will make Script Encoder Plus use escape sequences in JavaScript code statements. This will dramatically decrease readability of your code. (There are more options available for this selection - see Conversion Properties below.)
  • Random escape (for JavaScript) - when checked will make Script Encoder Plus use escape sequences randomly for better obfuscation. (There are more options available for this selection - see Conversion Properties below.)
  • Random capping (for VBScript) - when checked will make Script Encoder Plus capitalize variable and method names in the VBScript for better obfuscation. (There are more options available for this selection - see Conversion Properties below.)
  • Add Semicolons (for JavaScript) - when checked will make Script Encoder Plus add required semicolons at the end of script lines to ensure better scrambling achieved by stripping spaces between code lines, which might not be possible because of omitted semicolons. WARNING: Try to put semicolons required by the language syntax at the end of code lines while programming, and always check semicolons added automatically by Script Encoder Plus (they will be marked in After window after conversion is done).
  • Add Colons (for VBScript) - when checked will make Script Encoder Plus add colons at the end of lines in the VBScript script to make it appear as a solid line of code.
  • Remove Semicolons - when checked will make Script Encoder Plus remove extra semicolons in the script that are not required for scrambling. WARNING: Always check semicolons removed automatically by Script Encoder Plus (they will be marked in Before window after conversion is done).

When conversion options are set, you may now click Convert button to perform conversion.

Depending on the size of the script, converted code will then appear in After window. It will include the color coding for better readability. If you opted to add or remove (semi-)colons from JavaScript/VBScript blocks, they will be also marked in yellow in After or Before windows, respectively.

Controls and Navigation

Script Encoder Plus has all controls located on its toolbar. The same controls (commands) are also available from its main menu:

  • Clear 'Before' Window - opens a new document and clears Before window (use it to insert script into Before window manually.)
  • Open - opens a window that allows you to select a file for conversion. You can also open a script file by dragging its icon into Before window, or by selecting it from the File menu's recently opened section.
  • Save 'After' Window - opens a window that allows you to save converted document from After window into a file. You can select the following options in the Save As window:
    • File Encoding - allows you to specify file encoding used to save file.
    • Save for offline viewing - option used for compatibility with IE on Windows XP SP2 and later OS. When checked saves HTML file for offline viewing. This prevents Internet Explorer from showing warning messages.
  • Cut - cuts selected text from Before or After window into the Windows clipboard. (To determine which window is currently active look at the title above it. When it's bold, it means that the window has keyboard focus. To switch between Before and After windows click its title, or press Alt+1 or Alt+2 shortcut keys.)
  • Copy - copies selected text from Before or After window into the Windows clipboard. (To determine which window is currently active look at the title above it. When it's bold, it means that the window has keyboard focus. To switch between Before and After windows click its title, or press Alt+1 or Alt+2 shortcut keys.)
  • Paste - inserts text from the Windows clipboard into Before or After window. (To determine which window is currently active look at the title above it. When it's bold, it means that the window has keyboard focus. To switch between Before and After windows click its title, or press Alt+1 or Alt+2 shortcut keys.)
  • Erase - erases selected text from Before or After window. (To determine which window is currently active look at the title above it. When it's bold, it means that the window has keyboard focus. To switch between Before and After windows click its title, or press Alt+1 or Alt+2 shortcut keys.)
  • Select All - selects all the text in Before or After window, depending on which one is currently selected.
  • Move to 'Before' - copies code from After window into Before window. This option might be used for recurring conversion due to complexity of the script.
  • Undo - undoes code changes in Before or After window. This option is multi-level, enabling you to revert to previous state of the script.
  • Redo - rolls back changes undone by the undo option.
  • Encoding - shows the window to select File Encoding and Code Page that will be used to save scripts in the After window into a file. Use this option to set conversion type of HTML script to a preferred code page and/or file encoding. Read more here. (This feature is mostly used for non-English pages and alphabets.)
  • Find - shows the window to perform text search in Before or After windows.
  • Next Semicolon - if semicolons were added or removed from Before or After windows, this option cycles forward through them by highlighting added or removed semicolons.
  • Previous Semicolon - if semicolons were added or removed from Before or After windows, this option cycles back through them by highlighting added or removed semicolons.
  • Locator - translates selected code block from one window to another. This option might be useful for debugging your code: for instance, you may want to select a questionable part of the code in Before window and click this button. It will find selected code in After window. It also works the opposite way. INFORMATION: Locator should not be used for determining exact correlation between original and converted scripts - it only hints location of the selected segment.
  • Preview 'Before' Window - previews the script from Before window in the web browser. Using this option, you don't have to save contents of Before window to see how the original script works. Using a drop-down menu on the side of this button, you can select and customize which browsers should be used to open the script from Before window. (Microsoft Internet Explorer web browser is used by default for HTML, and a built-in scripting host for JavaScript and VBScript scripts.)
  • Preview 'After' Window - previews the script from After window in the web browser. Using this option, you don't have to save contents of After window to see the results of conversion. Press this button to open the converted script in a web browser to see if there were any errors during conversion. Using a drop-down menu on the side of this button, you can select and customize which browsers should be used to open the script from After window. (Microsoft Internet Explorer web browser is used by default for HTML, and a built-in scripting host for JavaScript and VBScript scripts.)
  • Conversion Properties - opens the window to set additional conversion options:

    INFO: These properties have "global" scope.

    • Keep comment tags when scrambling - if checked does not discard HTML comment tags (i.e., tags like <!-- ... -->) when scrambling. In many cases you won't need them to be included in the production script. But, in rare instances some scripts on the page might require comment tags to mark certain code parts. As a script developer you should know whether to use this option, or not. (When checked reduces the resulting code size.)
    • Use comment tags on script blocks if allowed - if checked, puts the comment tags (i.e., tags like <!-- ... -->) into the embedded script blocks. If on, will increase the code size and the readability of the script. But, these tags might be still required by older browsers to process your HTML/classic ASP document correctly.
    • Allow selective scrambling of URLs - if checked, escaping of links in the HTML document is permitted while scrambling.
    • Don't use short hex escape sequences in URLs (i.e., %XX) - if checked will prevent the use of the hexadecimal escape sequences in links in the HTML/classic ASP document. Example of such symbol is '%20' standing for space. (Some older web browsers do not interpret these characters correctly when they are present in web links. There also might be an issue with some web servers misinterpreting these escape sequences in the GET parameters of the URLs.)
    • Allow applying Windows Script Encoding to - option allows to select which script blocks should be affected by the Windows Script Encoder method:
      • All JavaScript/JScript/VBScript blocks - will apply to all JavaScript, JScript, or VBScript blocks within HTML and classic ASP pages. (This option is used by default.)
      • All server-side script blocks only - will apply to all JavaScript, JScript, or VBScript blocks within classic ASP pages only. This option excludes client-side HTML scripts.
      • Specified script blocks - will apply to specified script blocks only. Use the field below to specify which scripting languages, in a comma-separated list. This option applies to client-side and server-side scripts.
    • Default Scripting Language (ASP) - this option allows you to specify which language (VBScript or JScript) will be used by default while scrambling a classic ASP script, if one is not specified in the ASP script itself. (A default language is usually specified by the @language directive at the beginning of the classic ASP script.)
    • Add/update @language directive when encoding scripts (ASP) - check this option if the @language directive should be updated automatically while encoding a classic ASP script using Windows Script Encoder method.
    • Allow escaping quotes in client-side scripts - check this option to allow escaping of quotes in client-side scripts embedded in HTML pages. (This option does not affect classic ASP server-side scripts.)
    • Allow escaping code in client-side scripts - check this option to allow escaping of code in client-side scripts embedded in HTML pages. (This option does not affect classic ASP server-side scripts.)
    • Random Escaping/Capping Threshold - this slider lets you select preferred random escaping (for JavaScript) or capping (for VBScript) threshold value. Random escaping/capping is used to obfuscate HTML/classic ASP, JavaScript and VBScript code. If you move this slider towards the left (Less) side, this will mean inclusion of less escaped/capped symbols in the scrambled code (thus reducing file size but increasing readability); if you move the slider towards the right (More) side, this will mean inclusion of more escaped/capped symbols (thus increasing the file size but decreasing the readability.)
    • Always escape non-ASCII characters in JavaScript - check this option to allow escaping of non-ASCII symbols in JavaScript scripts. (Using this option will make Script Encoder Plus use longer escape sequences on any non-ASCII symbols.)
    • Don't change file names when saving converted data - this option is provided for compatibility with the older version of the Script Encoder Plus. It is strongly recommended to keep this option unchecked. By keeping it unchecked, the Script Encoder Plus will add (scrambled) or (encoded) to the end of a file name when saving a converted script. IMPORTANT: Never write over an original file after performing an automatic conversion with the Script Encoder Plus!
    • Verbose mode, i.e. show info and warning messages after conversion - when checked will make Script Encoder Plus to show pop-up dialog messages with the results of each script conversion. (This option can be also canceled from any of the pop-up messages themselves.)
    • Show warning before previewing JavaScript or VBScript - check this option to make Script Encoder Plus show a warning before running a JavaScript or a VBScript script locally. (Use this option in case you do not know the origins of a script you might be loading into the Script Encoder Plus.)
    • Show file encoding incompatibility warnings for scripts - check this option to make Script Encoder Plus check for possible file encoding incompatibility issues for certain scripts & display user warnings if any are detected. (Example: Standalone JScript and VBScript files cannot be saved with UTF-8 encoding when used within the Windows Script Host.)
    • Convert scripts automatically upon opening - if checked, will make Script Encoder Plus convert a script as soon as you open it. Otherwise, you'll need to click "Convert" button to begin conversion. (This option has no effect in unregistered demo copy of the Script Encoder Plus. In that case, the Script Encoder Plus will wait for the "Convert" button to be pressed before beginning the conversion.)
    • Defaults button - resets all settings to their defaults. (Note that one needs to OK this window to save changes.)
    • OK button - saves changes done to the settings in this window.
    • Cancel button - discards changes done to the settings in this window.

Status bar

The status bar is located at the bottom of the Script Encoder Plus window. It shows the following information:

  • First section may contain description of a button or a command currently pointed at by the mouse cursor:

  • The first section may also display the last syntax error that was found in the script in Before window during conversion:

    INFO: Double-click on this section of the status bar to place the cursor at the location reported in the error message.

  • Second section contains line and column numbers that specify the location of the keyboard cursor in the currently active window:

  • Third section contains current file encoding that will be used to save the contents of After window to a file:

    INFO: To change it double-click it.

  • Fourth section contains current code page name that will be used to save the contents of After window to a file:

    INFO: To change it double-click it.

  • Next sections show the keyboard status, such as Caps Lock, Num Lock:

International Settings

Script Encoder Plus is a Unicode-based application, supporting many file encodings and international code pages. It will automatically detect the code page and file encoding when you open a script. To change any of these settings go to File -> Encoding. You will have an option for the following file encodings:

  • ANSII - older encoding from American National Standards Institute using one byte per character. (This encoding is used by default for all English pages as it produces the most size-efficient files. But, it might not contain enough symbols to save non-English text.)
  • Unicode - encoding using two bytes per character, which allows many international characters to be saved without distortion. The downside of using this encoding is that it doubles the file size needed to store and transmit a script page.
  • Unicode (Big-endian) - the same as Unicode but with reversed byte order.
  • UTF-8 - encoding that employs a mix of ANSI and multi-byte characters. It may be the most effective way to save international web pages since it uses one byte encoding for English characters and multi-byte encoding for any others.

Besides that Script Encoder Plus allows you to select the code page that will be used in HTML documents (for conversion) when saving data to a file. A complete list of supported code pages might be found in the corresponding box in the File Encoding & Code Page window.

Command Line Operation

Script Encoder Plus can be run from the Windows command line without involving the visual editor. This could be useful if you prefer to run Script Encoder Plus in the background, or as a part of another software. It can perform the same tasks from a command line as those that are available in its normal (GUI) operation. For more information go to Help -> Command Line Help from the main menu in the Script Encoder Plus, or click here to read the command line manual.

Batch Conversion Using Command Line

Script Encoder Plus can also do a batch conversion of HTML/classic ASP, JavaScript/VBScript, C/C++ files within a single or nested folders using the command line options. Also watch the screencasts for an example of the batch conversion.

Encoder Policy

Script Encoder Plus is now distributed in the "Encoder" package, which allows every possible obfuscation (scrambling) of HTML/classic ASP, JavaScript/VBScript, C, C++ code. On the other hand, we removed "de-scrambling" capabilities from the Encoder version.

For those who would like to receive a complete set of features of the Script Encoder Plus (including full de-scrambling capabilities) we also offer the Premium Version. (To learn more go to Help -> Get Premium Version from the main menu in the Script Encoder Plus.)

 

Thank you for using Script Encoder Plus!

Feel free to send us your bug reports and suggestions for improvement. Even though we can't answer every single email, we listen and appreciate your time writing us!

Support Team
www.dennisbabkin.com

 

 

FAQ

Check Frequently Asked Questions to find answers to yours

Social Media

Download

Windows XP/Vista/7/8/10

User Feedback