Can I decompile an existing installer?: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
==About==
Currently NSIS installers cannot be fully decompiled. The installer itself doesn't provide any method to extract files or the script without installation. It is the developer's choice whether the source code and/or the files for the installer are available to the public or not.
Currently NSIS installers cannot be fully decompiled. The installer itself doesn't provide any method to extract files or the script without installation. It is the developer's choice whether the source code and/or the files for the installer are available to the public or not.


There are, however, external tools that allow this. [http://www.7-zip.org 7-zip] (version 4.40beta at the time of this writing) supports decompressing NSIS installers compressed with lzma or bzip, but the source code is still partially compiled and requires extensive modification before the script can be recompiled. The decompression plug-in InstallExplorer [http://www.totalcmd.net/plugring/installexplorer.html InstExpl.wcx] is also available for ''TotalCommander''. For use without the TotalCommander the [http://legroom.net/software/uniextract Universal Extractor] i a good option.
==Extraction Tools==
 
There are, however, external tools that allow this:
And there is the [[NullsoftDecompiler]] or 'NSIDecomp'. It's a open source Python script that'll help you to nearly fully recover you NSIS-installation script.
* Since version 4.42[may 2006] [http://www.7-zip.org 7-zip] supports decompressing NSIS installers. However it omits to also extract the compiled scriptcode.
State is currently alpha - its not very user friendly and it'll expects the script.bin' that'll come from InstExpl.wcx.
* The decompression plug-in '''InstallExplorer''' [http://www.totalcmd.net/plugring/installexplorer.html InstExpl.wcx] is also available for '''TotalCommander'''. For use without the TotalCommander the [http://legroom.net/software/uniextract Universal Extractor] is a good option.


==Decompilers==
* [[NullsoftDecompiler]] or '''NSIDis'''.
It's a open source Python script that'll help you to nearly fully recover your NSIS-installation scripts. Its state is currently alpha - and so not very user friendly and it'll expect a 'script.bin' that'll come from InstExpl.wcx.


== Protection against Decompilers==
As a general note to software developers, you should use a plugin like [[DcryptDll : Adding Encryption to NSIS|DCryptDll]] if you need to protect certain files in your installer.  
As a general note to software developers, you should use a plugin like [[DcryptDll : Adding Encryption to NSIS|DCryptDll]] if you need to protect certain files in your installer.  


.. or if ya in the mood for compiling the NSIS have a look into ''nsis-3.xx-src\Source\exehead\fileform.h''. Mixing up the order of the enum with all the EW_* a little bit as recommend in the Comment. It will mess up decompilers output that expect these tokes to be in the standard order.
[[Category:General FAQ]]
[[Category:General FAQ]]

Revision as of 17:23, 16 February 2014

About

Currently NSIS installers cannot be fully decompiled. The installer itself doesn't provide any method to extract files or the script without installation. It is the developer's choice whether the source code and/or the files for the installer are available to the public or not.

Extraction Tools

There are, however, external tools that allow this:

  • Since version 4.42[may 2006] 7-zip supports decompressing NSIS installers. However it omits to also extract the compiled scriptcode.
  • The decompression plug-in InstallExplorer InstExpl.wcx is also available for TotalCommander. For use without the TotalCommander the Universal Extractor is a good option.

Decompilers

It's a open source Python script that'll help you to nearly fully recover your NSIS-installation scripts. Its state is currently alpha - and so not very user friendly and it'll expect a 'script.bin' that'll come from InstExpl.wcx.

Protection against Decompilers

As a general note to software developers, you should use a plugin like DCryptDll if you need to protect certain files in your installer.

.. or if ya in the mood for compiling the NSIS have a look into nsis-3.xx-src\Source\exehead\fileform.h. Mixing up the order of the enum with all the EW_* a little bit as recommend in the Comment. It will mess up decompilers output that expect these tokes to be in the standard order.