Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

Get help with using AutoHotkey and its commands and hotkeys
User
Posts: 112
Joined: 26 Jun 2017, 08:12

Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

20 Nov 2017, 23:40

Haha, I almost died laughing at this situation, but anyway,

so, as the title suggests, it seems that AutoHotKey "Compiler" is just a "compactor" after all! All it does is compact the AHK interpreter and the script code into an ".exe" file with no layer of protection! (at least with compiler\compactor v1.1.23.05! Does the latest compiler\compactor do the same thing?)

I downloaded a ".msi" file from Softpedia web site that installs "IronAHK"! Then I installed "7-Zip" in order to extract the ".msi" file and get the "IronAHK.exe" file (which I did not find)! The funny thing is that, I accidentally extracted with "7-Zip" an ".exe" file compiled (compacted) with AutoHotkey and just to find out that the script source code is just there within some folders unprotected! (I am very surprised because I thought that it would be necessary a specific tool to get script code from compiled ".exe" files, but guess what, just extracting the ".exe" file with "7-Zip" is enough to get the script source code!)

I've made some tests with AutoHotKey v1.1.23.05 and found out that it compiles (compacts) the script code the same way as described above! Since I don't want to install the latest version of AutoHotKey, I would like to know if the latest version compiles (compacts) the script code the same way as v1.1.23.05? Thanks!
User avatar
gregster
Posts: 329
Joined: 30 Sep 2013, 06:48

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 00:28

Yes, it has always been this way, it is still and you can find lots of posts about it. But I thought you already knew, when you wrote 'AHK "compiler" simply packages into the ".exe" files the AHK interpreter along with your source code' in this thread: https://autohotkey.com/boards/viewtopic ... 25#p182309 , because that is exactly what it does...
You can even identify the source code when you just open the exe-file with notepad. You don't need 7-zip.
Well, I think there was once, in AHK 1.0.x, some kind of password protection and a NoDecompile-Switch which didn't do much of protection, so they abandoned it. Personally, I couldn't care less about that ;)

(Some people use special packers or obfucastors which make it harder, but a motivated user will probably always be able to decompile. Also AHK_H has some slightly advanced methods, as far as I remember, but I think you would have to compile AHK_H yourself to add a password)
User
Posts: 112
Joined: 26 Jun 2017, 08:12

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 10:19

gregster wrote:.


I really thought that it would be necessary a specific tool for each version of autohotkey in order to get the source code from compacted ".exe" files!

So, does the latest autohotkey version compact the scripts source code into ".exe" files with no layer of protection as mentioned above?

and by the way, it would be more correct to label the "compiler" folder that contains "Ahk2Exe.exe" file as "Compactor" folder, since compilation is not compaction, because as far as I know, compiling a script source code implies translating its contents into native machine instructions, and AutoHotKey compiler doesn't do that! And the "Compile Script" option from windows context menu should be changed to "Compact Script to (.exe)" instead!
Georgie Munteer

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 10:39

take an exe compiled with c++ and use 7zip to extract, you will see a similar setup
User
Posts: 112
Joined: 26 Jun 2017, 08:12

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 17:06

Georgie Munteer wrote:take an exe compiled with c++ and use 7zip to extract, you will see a similar setup


As far as I know C++ genuinely compiles (translates the source code into native machine instructions) and then I guess that the compiled code is compacted into a ".exe" file! (I'm just guessing because I really don't know how C++ does all the thing!)

and I don't know how hard or easy (or if it is even possible) to translate back native machine instructions to script source code! (if it is not possible to translate back native machine instructions to script source code, then it's clearly that script genuine compilation is more secure than just script compaction!)
Georgie Munteer

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 17:18

User wrote:
Georgie Munteer wrote:take an exe compiled with c++ and use 7zip to extract, you will see a similar setup


As far as I know C++ genuinely compiles (translates the source code into native machine instructions) and then I guess that the compiled code is compacted into a ".exe" file! (I'm just guessing because I really don't know how C++ does all the thing!)

and I don't know how hard or easy (or if it is even possible) to translate back native machine instructions to script source code! (if it is not possible to translate back native machine instructions to script source code, then it's clearly that script genuine compilation is more secure than just script compaction!)

when you unzip with 7zip a ahk exe you dont see clearly anything just like when you unzip a exe make by .net or c++
User
Posts: 112
Joined: 26 Jun 2017, 08:12

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 17:54

Georgie Munteer wrote:.


Haha, please don't make me laugh ok?

Sorry, but to find the script code file after extraction is as easy as extracting the ".exe" file! (and the script is not even encrypted!)
Georgie Munteer

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 18:03

User wrote:
Georgie Munteer wrote:.


Haha, please don't make me laugh ok?

Sorry, but to find the script code file after extraction is as easy as extracting the ".exe" file! (and the script is not even encrypted!)

download latest version of ahk, you will see that its not possible to do what you think
User avatar
gregster
Posts: 329
Joined: 30 Sep 2013, 06:48

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 18:12

Georgie Munteer wrote:download latest version of ahk, you will see that its not possible to do what you think
It's lIke I said:
You can even identify the source code when you just open the exe-file with notepad.
(except the orignal commentary, just scroll down close to the end)
But who cares?
User avatar
gregster
Posts: 329
Joined: 30 Sep 2013, 06:48

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 18:21

User wrote:and by the way, it would be more correct to label the "compiler" folder that contains "Ahk2Exe.exe" file as "Compactor" folder, since compilation is not compaction, because as far as I know, compiling a script source code implies translating its contents into native machine instructions, and AutoHotKey compiler doesn't do that! And the "Compile Script" option from windows context menu should be changed to "Compact Script to (.exe)" instead!

The term "compactor" would probably create more confusion than it would clear up. Especially, because compiling in AHK doesn't really make scripts more compact, but at least it creates an executable (and a part of that - the interpreter - is even compiled according to your definition). And in the actual word sense, "compiling" seems like a good fit for that process. If that meets some definition of compiler or misses another, is not really important. Either the language works for you, or not. If it doesn't, you can even fork. And then, you could even call it 'banananizer', if you wanted to, without breaking any law or being arrested by the 'compiler' police.
User
Posts: 112
Joined: 26 Jun 2017, 08:12

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 18:26

gregster wrote:But who cares?


Speak for yourself my friend! You may don't care, but there are others that do care about this!

Saying that, now I don't know who is saying the true! Maybe other users can confirm if the latest version compacts or not the script the same way as I mentioned above!
User avatar
gregster
Posts: 329
Joined: 30 Sep 2013, 06:48

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 18:33

User wrote:
gregster wrote:But who cares?


Speak for yourself my friend! You may don't care, but there are others that do care about this!

Saying that, now I don't know who is saying the true! Maybe other users can confirm if the latest version compacts or not the script the same way as I mentioned above!

Then just install the portable version, if you are so afraid of installing it and see for yourself. Or you don't :crazy: . That's fine for me, too.

In my experience, the people that care the most about missing encryption (or 'real' compilation) are people who shouldn't have any use for it, because the code they try to hide is really not that interesting (like always, exceptions to the rule exist).
User
Posts: 112
Joined: 26 Jun 2017, 08:12

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 18:36

gregster wrote:And then, you could even call it 'banananizer', if you wanted to, without breaking any law or being arrested by the 'compiler' police.


I think you right and I must agree with you, "banananizer" would fit better for AutoHotKey instead "Compile"!
User
Posts: 112
Joined: 26 Jun 2017, 08:12

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 18:37

gregster wrote:In my experience, the people that care the most about missing encryption (or 'real' compilation) are people who shouldn't have any use for it, because the code they try to hide is really not that interesting (like always, exceptions to the rule exist).


So that is why you always compile your scripts?
User
Posts: 112
Joined: 26 Jun 2017, 08:12

Re: Can "7-Zip" decompile (extract) ".exe" files compiled (compacted) with the latest AutoHotKey compiler (compactor)?

21 Nov 2017, 19:02

gregster wrote:Close, but no cigar banana.


Yes my friend, you right, you should stop banananizing your scripts, just share your scripts publicly with no shame, ok? if you do bad coding, that's ok, people here in this forum can guide you to the right direction!

Close, but no cigar banana.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], sqlcode, TXShooter and 42 guests