Decompiling
-
- Posts: 9
- Joined: 12 Mar 2018, 10:30
Re: Decompiling
This is great, best things In life are free indeed. I really appreciate this.
I was wondering if the lib folder could be packed together when AHK_H gets recompiled.
Not talking about the moment of compiling, but prior to that i.e. the time that AHK_H gets recompiled with Visual Studio.
I was wondering if the lib folder could be packed together when AHK_H gets recompiled.
Not talking about the moment of compiling, but prior to that i.e. the time that AHK_H gets recompiled with Visual Studio.
Also if you could throw yet a few more free stuff regarding methods to create proper/dynamic password at the time AutoHotkey_H gets recompiled with Visual Studio. Thank you, Mr. HotKeyIt.HotKeyIt wrote:1. If you make a proper or even dynamic password it will be very difficult, there is always a way to decompile
2. Yes you could do but I an not sure what you can do. (obfuscation!?)
Re: Decompiling
Not sure if I got that right but Autohotkey_h can use libraries packed as resources. Some functions in autohotkey_h are actually .ahk library files added as resources in the exe after c++ compile. Look at the "CleanUpAndPack.ahk" script included in the autohotkey_h source.AHKtreasureland wrote:This is great, best things In life are free indeed. I really appreciate this.
I was wondering if the lib folder could be packed together when AHK_H gets recompiled.
Not talking about the moment of compiling, but prior to that i.e. the time that AHK_H gets recompiled with Visual Studio.
e.g: https://github.com/HotKeyIt/ahkdll/blob ... ck.ahk#L37
Re: Decompiling
https://github.com/HotKeyIt/ahkdll/issues/15lolkaru wrote:How to set password? With the default password, program does not start, error like this:
https://image.prntscr.com/image/Ly4_zKz ... pE1sgg.png
If I did not set a password, and only used compression, will the program be hacked easily? Thx.
Re: Decompiling
HotKeyIt wrote:https://github.com/HotKeyIt/ahkdll/issues/15lolkaru wrote:How to set password? With the default password, program does not start, error like this:
https://image.prntscr.com/image/Ly4_zKz ... pE1sgg.png
If I did not set a password, and only used compression, will the program be hacked easily? Thx.
This error appears to come from not renaming AutoHotkey.exe (from ahkdll-v1-release-master\Win32w\) to Ahk2Exe.exe. AutoHotkey.exe must be renamed to Ahk2Exe.exekapastratos wrote: Hello,
I did it but I got an error (see picture).
Any help on that please?
The wording can possibly cause confusion, because it's not just copying the file over, but renaming the file too.
Maybe AutoHotkey.exe should have been renamed as Ahk2Exe.exe and put in the ahkdll-v1-release-master\Compiler\ directory by default. So when downloaded, it can be used immediately. Another area of confusion is downloading from the wrong directory. The person might have linked or downloaded from the Ahk2Exe directory, instead of the ahkdll-v1-release directory. That directory has a file called, Ahk2Exe.ahk. And this could result in confusion and getting errors. With this link, you can see all of the different HotKeyIt directories. https://github.com/HotKeyIt From there, a person can see the correct directory to choose, ahkdll-v1-release. This includes helping to prevent confusion about the ahkdll-v2-release directory VS the ahkdll-v1-release directory.
This error comes from not using the default password of AutoHotkey. How or the best way to change the password, other than using the default, is still a bit fuzzy and difficult. It would be great if the process was more automated and convenient. Perhaps something along the lines of what Feiyue has done.
https://autohotkey.com/boards/viewtopic ... 28&t=42494
That is have the Ahk2Exe script to Exe converter encrypt the script with whatever password the user chooses, but this is carried out by an additional function that does not require the source code to be recompiled. This possible additional encrypt and decrypt function could be added by the Ahk2Exe script or "pre-built" into the source code. Maybe allowing the user to encrypt the script with whatever password they choose.
Re: Decompiling
@HotKeyIt: everything you said about protecting source from debuggers applies to Ahk_h v1 as well? or only v2?
Can you give me an example of everything I should do to make a dynamic password? (I don't mean "do it for me" I mean which steps should i follow to change the password declaration to something dynamic?)
Thanks in advance, you kept my passion for ahk alive. Before I saw this topic I was going to learn C++ to rewrite every script I want to sell.
Can you give me an example of everything I should do to make a dynamic password? (I don't mean "do it for me" I mean which steps should i follow to change the password declaration to something dynamic?)
Thanks in advance, you kept my passion for ahk alive. Before I saw this topic I was going to learn C++ to rewrite every script I want to sell.
Re: Decompiling
Applies to both v1 and v2.
In this line you should instead call the function that returns your password: https://github.com/HotKeyIt/ahkdll/blob ... .cpp#L3219
Whatever you do you can see in debugger what you function returns and use it as password.
You might need to adapt some other lines, search project for g_default_pwd.
In this line you should instead call the function that returns your password: https://github.com/HotKeyIt/ahkdll/blob ... .cpp#L3219
Whatever you do you can see in debugger what you function returns and use it as password.
You might need to adapt some other lines, search project for g_default_pwd.
Re: Decompiling
Thank you for answering, is there any limit on the password? like what type of characters it can contain ([a-z] [A-Z] [0-9] etc) or how many characters it can contain?HotKeyIt wrote: ↑12 Jan 2019, 16:39Applies to both v1 and v2.
In this line you should instead call the function that returns your password: https://github.com/HotKeyIt/ahkdll/blob ... .cpp#L3219
Whatever you do you can see in debugger what you function returns and use it as password.
You might need to adapt some other lines, search project for g_default_pwd.
Thanks in advance (sorry for my bad english )
Re: Decompiling
You define the limit yourself and any characters are supported.
-
- Posts: 150
- Joined: 28 Sep 2016, 11:14
- Contact:
Re: Decompiling
Howdy HotKeyIt,
Hope you're well!
Excited to try the procedure you mentioned on this thread to prevent decompiling.
I get it that I need to recompile Autohotkey_H. Visual Studio 2019 is roaring and ready to go.
Here's where I am so far:
- cloned https://github.com/HotKeyIt/ahkdll
- grepped g_default_pwd
- You said to change from the default of 'Autohotkey' but I do not find that string.
On this issue, you mention to edit three lines to change the password:
I see where "Autohotkey" is embedded in the first string, but don't see what to do with the two for loops.
Would you please give an example of what these lines should look like in order to set the password to NEW_PASSWORD?
Big thanks in advance.
EDIT:
- I only changed that long string "A\0\0\0\0u\0\0\0\0t\0..."
- Compiled in VS2019 after changing the target to the latest MS SDK.
- When running the new Autohotkey.exe, it says:
Hope you're well!
Excited to try the procedure you mentioned on this thread to prevent decompiling.
I get it that I need to recompile Autohotkey_H. Visual Studio 2019 is roaring and ready to go.
Here's where I am so far:
- cloned https://github.com/HotKeyIt/ahkdll
- grepped g_default_pwd
- You said to change from the default of 'Autohotkey' but I do not find that string.
On this issue, you mention to edit three lines to change the password:
Code: Select all
pw[i] = pwd == g_default_pwd ? (TCHAR) _T("A\0\0\0\0u\0\0\0\0t\0\0\0\0o\0\0\0\0H\0\0\0\0o\0\0\0\0t\0\0\0\0k\0\0\0\0e\0\0\0\0y\0\0\0\0")[i*5] : (TCHAR)*pwd[i];
(...)
for (int i = 0; i < 10; i++)
*g_default_pwd[i] = i + 1;
(...)
for (int i = 0; i < 10; i++)
*g_default_pwd[i] = i + 1
Would you please give an example of what these lines should look like in order to set the password to NEW_PASSWORD?
Big thanks in advance.
EDIT:
- I only changed that long string "A\0\0\0\0u\0\0\0\0t\0..."
- Compiled in VS2019 after changing the target to the latest MS SDK.
- When running the new Autohotkey.exe, it says:
- Extracted the zip file you provided, moved the new Autohotkey.exe to the "Compiler" folder and renamed to Ahk2Exe.exe and ran: same error.Script file not found:
(...path...)\ahkdll\MDbin\Win32w_debug\Test\Test.ahk
Re: Decompiling
This thread is probably not where you want to post your issue. After the creation of this thread, kyuuuri has posted a guide in a new thread. The guide gives a better English explanation than has existed previously. Part of the problem with understanding the procedure appears to have been a language barrier and a lack of clear explanations (for less advanced users), but kyuuuri might have fixed that. You might want to go through the guide, step by step, and if you get stuck then make a post about which step that is causing you a problem.freespacing wrote: ↑27 Apr 2019, 13:35Howdy HotKeyIt,
Hope you're well!
Excited to try the procedure you mentioned on this thread to prevent decompiling.
I get it that I need to recompile Autohotkey_H. Visual Studio 2019 is roaring and ready to go.
Here's where I am so far...
[Guide] Compiling Ahk_h's source step by step
https://www.autohotkey.com/boards/viewtopic.php?f=65&t=62308
-
- Posts: 150
- Joined: 28 Sep 2016, 11:14
- Contact:
Re: Decompiling
Thank you very much, @SOTE.
That thread looks like a great resource!
That thread looks like a great resource!
Who is online
Users browsing this forum: No registered users and 11 guests