Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script Encoding

Status
Not open for further replies.

Aladdin420

Programmer
Jan 5, 2001
33
0
0
US
Encoding means that when a, for example '.vbs', file is encoded by using an encoding application, the source code of that '.vbs' file is no longer understandible.

Here's the story, I just encoded 'Cool.vbs' to 'Cooler.vbs'.
Now the Cool.vbs, which was not encoded, works fine, but it's new encoded version 'Cooler.vbs' doesn't run and gives errors.

Is it possible to run a '.vbs' file that has been encoded? So far it seems to me that it's not possible.

Thanx All

Aladdin420
 


alladin420,

Cscript.exe and/or Wscript.exe expects an ascii file with commands in it. Obviously it can't understand coded files. What do you mean encoded? What did you run it through?

fengshui1998
 
Check MSDN for "encoded script". There are many reasons.
"Remarks
There are four kinds of files than can be processed by the Script Encoder. They are:

ASP. This format consists of a text active server page containing valid HTML and embedded scripting blocks within <SCRIPT> ... </SCRIPT> tags or <% ... %> tags. Applications that use this format include Microsoft® Internet Information Services (IIS). Recognized file extensions are .asp, .asa, and .cdx.
HTML. This format consists of a text file that contains valid HTML along with embedded script blocks. Applications using this scripting format include Microsoft FrontPage®, Microsoft® Visual InterDev™ and virtually all Web designers and browsers. Recognized file extensions are .htm and .html.
Plain text. This format consists of text file that contains only script with no surrounding tags. Applications using scripting format include Windows® Scripting Host (WSH) and Microsoft® Outlook®. Recognized file extensions are .js and .vbs, which are changed to .jse and .vbe, respectively, after encoding.
Scriptlet. This format consists of a text file that contains valid scriptlet code within <SCRIPT> ... </SCRIPT> tags. Recognized file extension is .sct and .wsh&quot;
 
I downloaded the encoder from the MSDN web site. It's called 'Windows Script Encoder 1.0'. It's very simple to use and it's purpose is to protect the source code of scripts, by screwing up the source code so that when looked at, it doesn't make sense to a reader.

Now I tested the encoder with a VBScript that's used on HTML pages, and converted that .html file. I ran the converted version and it works great.

However, if I run the converted version of a regular text .vbs file that has nothing to do with web pages, it doesn't run.

I hope I'm making sense...hum..let me know if anyone have a question on my question. :)

Thanx again ppl.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top