Compiling .hta file in .exe

I searched around the world for a way to compile my .hta file (and resources) into a .exe file.

There are many applications that claim to be able to do this, but they did not work for this application - it is a mixture of javascript and VB.

Just, (and naively), I don’t want people to look / screw the code. Any suggestions or solutions would be highly appreciated.

EDIT: Of course, I understand that javascript and VB are not "compiled" because they are interpreted in languages. I'm just looking for a way to really hide the source.

+6
javascript html hta
source share
6 answers

You can “compile exe” by simply wrapping the HTA in an executable file that knows how to configure the HTA context / window.

The most trivial approach (which sounds like ExeScript) is to first extract the HTA / resources and then execute them. Theoretically, you can do this without temporary files by entering data into the working context of IE, but the task becomes more complex. Internal JS may or may not be confusing, and the shell may or may not add an extra layer of obfuscation / "encryption." (PayMo, and I'm sure there are others, uses a wrapped contextual approach to distribute one executable exe).

If protecting “intellectual property” is the goal, hire a good lawyer :-)

+2
source share

Try using VBSedit , it definitely works to convert both vbs and hta to exe

+3
source share

The HTAEdit that ships with VBSedit doesn’t really hide the hta code. At run time, it extracts the hta source file into a subdirectory in% temp% and passes it to mshta.exe for execution. The converted exe created by VBSedit doesn't seem to do this as far as I can tell.

+3
source share

I'm not sure about compilation in exe, but if you minimize and confuse the source code, if you don't have something incredibly valuable, it would be a huge job to reverse engineer.

http://developer.yahoo.com/yui/compressor/

Good luck.

+1
source share

You do not need a compiler, you need a cipher / decoder, for example, my project (under development), the CFS project (Cryptographica File Security).

+1
source share

My hint is to create a VBScript or JScript file for HTA that will be dynamically generated. Therefore, you are not compiling an HTA, but a script. This approach meets your security requirements far better than the HTA packaged in SFX.

First, prepare the resources - import into HTA all external files: scripts, stylesheets and images (base64-encoded) to make your standalone HTA application. Then create, for example, a VBScript file, and copy all the HTML content from your HTA into a string variable in the script, replacing the new lines and tabs with " & vbCrLf & " and " & vbTab & " . Add the code to dynamically create the HTA window , .write() this string variable in the window document and close the script.

Please note that Window_OnLoad() may not work properly due to clicking content on a window that has already been loaded.

Then simply encrypt your completed VBScript in exe (using a real encryption program like Primal Script 2012, ExeScript, VbsEdit or ScriptCryptor). And change the icon using PE Explorer.

All that will take some time, but it's worth it.

UPD: The following is an example prepared by a Script link .

0
source share

All Articles