Library code snippets

Encoding your script files

Download the free Windows Script Encoder utility from Microsoft's 
Scripting Web site (http://msdn.microsoft.com/scripting) and you'll 
be able to encode both server-side and client-side VBScript and 
JavaScript. To encode a script file, pass the name of your HTML or 
ASP file, along with a name for the new, encoded version of it, to 
the command-line script encoder, like this:

screnc file1.asp file1_enc.asp

Two important points: First, Microsoft doesn't provide a tool for decoding 
an encoded script file, so be aware that there isn't any straightforward 
way to reverse engineer the encoded file. This makes it important to keep 
the original, unencoded version! Second, this is encoding, not encryption, 
and as such, it isn't going to keep out a determined hacker, but it should 
be sufficient to stop more casual and simply curious Web programmers from 
seeing (or stealing) your code.

Comments

  1. 10 Dec 2003 at 05:57

    MS doesn't provide any script decoder but you can find it some on the web.
    Just try searching in google and you'll see.
    for exemple, have a look at http://www.virtualconspiracy.com/index.php?page=scrdec/intro for the decoder (the code is also provided).


    The algorythm is detailled at http://www.klaphek.nl/nr6/scrdec.html


    So I won't recommend the usage of this tool that doesn't secure anything.


    (

  2. 08 Oct 2003 at 16:40

    www.codesbreaker.com/default.asp

  3. 08 Oct 2003 at 16:39
  4. 23 Jan 2003 at 10:28

    Is there any other way to get some protection for your asp code?

  5. 25 Jun 2002 at 04:37

    There does exist a bug in the application when you encode pages on a machine with one type of Locale and put those pages on another machine with different settings(locale).

  6. 01 Jan 1999 at 00:00

    This thread is for discussions of Encoding your script files.

Leave a comment

Sign in or Join us (it's free).

AddThis

Related discussion

Related podcasts

  • Looking into the C# Crystal Ball with Charlie Calvert and Bill Wagner

    One of the most exciting announcements from PDC was the news about C# 4.0 and Visual Studio 2010. With all the excitement and discussion throughout the event about these new developer tools, we reached out to two experts in the fields. Charlie Calvert and Bill Wagner sat down with Keith and Woody...

Events coming up

  • Dec 6

    Developing AJAX Web Applications with Castle Monorail

    London, United Kingdom

    Monorail is the model-view-controller engine of the Castle Project, bringing many of the best ideas of Ruby on Rails to the .NET world. In this talk, David De Florinier and Gojko Adzic show how Monorail makes it easy to develop .NET based AJAX applications, and how to use the Castle Project to build Web 2.0 applications effectively. Come to this session if you are a .NET web developer. Everyone is welcome!