Page 1 of 2

AHK源代码加密器 v2.2

Posted: 06 Jan 2018, 17:33
by feiyue
在利用AHK解决实际问题时,有时想保护自己的劳动成果,不想直接给其他人看到。
但是当前的Ahk2Exe不能加密,源代码是明文附加在程序末尾的,起不到保护源代码的作用,
所以我制作了一个简单的AHK源代码加密器,可以防止小白,对高手没有什么作用。


Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Re: AHK源代码加密器 v1.5

Posted: 20 Jan 2018, 06:50
by oldbrother
xiexie!!!!

Re: AHK源代码加密器 v1.5

Posted: 06 Mar 2018, 12:38
by guest3456
nice

can you give an explanation in english? maybe you could post this in the "Scripts And Functions" forum

and can you provide the c++ source code for the machine codes?

Re: AHK源代码加密器 v1.5

Posted: 06 Mar 2018, 17:37
by garry
謝謝

Re: AHK源代码加密器 v1.5

Posted: 07 Mar 2018, 11:18
by feiyue
@guest3456, I've changed the script to English, but I don't want to repeat it to the "Scripts And Functions" forum.
If I provide the C source code for the machine code, the Encryptor is cracked. :beer:

Re: AHK源代码加密器 v1.5

Posted: 07 Mar 2018, 12:17
by SpeedMaster
Hello,

I tried the compiled exe script but a get this error. :cry:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Re: AHK源代码加密器 v1.5

Posted: 07 Mar 2018, 12:33
by feiyue
@SpeedMaster,
Because it is calling the AHK master program to run dynamically,
There must be a AHK master program in the same directory.

Re: AHK源代码加密器 v1.5

Posted: 07 Mar 2018, 13:00
by SpeedMaster
feiyue wrote:@SpeedMaster,
There must be a AHK master program in the same directory.


I do not see any AHK master program in the folder :?

03_07_18 @6_54_57.PNG
03_07_18 @6_54_57.PNG (9.91 KiB) Viewed 1820 times

Re: AHK源代码加密器 v1.5

Posted: 07 Mar 2018, 13:27
by feiyue
AHK master program is AutoHotkey.exe.
If AutoHotkey.exe is renamed abc.exe, Please modify Ahk=%A_ScriptDir%\abc.exe

Re: AHK源代码加密器 v1.5

Posted: 07 Mar 2018, 14:03
by SpeedMaster
I got it now :idea: :lolno:
Thanks :thumbup:

ahk.png
ahk.png (7.06 KiB) Viewed 1800 times

Re: AHK源代码加密器 v1.6

Posted: 08 Mar 2018, 21:08
by guest3456
can you explain what the new 'add' code does, with the Gui and getting the process Pid, and the Reload() func that is never called?

Re: AHK源代码加密器 v1.6

Posted: 08 Mar 2018, 22:40
by feiyue
Because the decoded code is not saved to the disk, it is sent directly to the AutoHotkey.exe to execute.
No source files lead to:
1. Only one is allowed to run at the same time (#SingleInstance force), is invalid.
Solution: Use a hidden GUI as the unique tag to prevent conflicts.
2, Reload is invalid. Solution: use the Reload() function instead. :beer:

Re: AHK源代码加密器 v1.6

Posted: 08 Apr 2018, 07:24
by Cuadrix
Very nice!

Re: AHK源代码加密器 v1.7

Posted: 21 Apr 2018, 15:51
by feiyue
Updated to the V1.7 version, made some improvements to avoid being easily cracked.
Thank you very much for Helgef ! :bravo:

Re: AHK源代码加密器 v1.7

Posted: 24 Apr 2018, 23:41
by brutus_skywalker
ROCKS!

Still Rocks, but script can be recovered by doing a memory dump of autohotkey.exe and using sysinternals 'strings' utility, to extract the code.

Simpler still uses processhacker to view the properties of the process running encoded script and just view strings in the memory tab of the properties.

Re: AHK源代码加密器 v1.7

Posted: 25 Apr 2018, 12:39
by feiyue
@brutus_skywalker, Thank you very much for the two ways to view memory text, and I learned new knowledge. :thumbup:

This method can extract fragmented source code text, but can not extract complete code.

It's really lucky. :D

Re: AHK源代码加密器 v2.0

Posted: 29 Apr 2018, 02:53
by feiyue
Updated to the V2.0 version, Enhance the difficulty of cracking. :superhappy:

Re: AHK源代码加密器 v2.0

Posted: 05 Jun 2018, 12:57
by AHKStudent
Hi

To share my app users need to download both files? Or can I just compile my main exe and have the autohotkey.exe within it (like through file install?)

What is the right way to do this?

Re: AHK源代码加密器 v2.0

Posted: 06 Jun 2018, 04:36
by alware
i am using gdi+ and gdip imagesearch but it seems encoded script won't recognize the image files that are in the same folder..
any help??

Re: AHK源代码加密器 v2.0

Posted: 07 Jun 2018, 01:25
by feiyue
@AHKStudent, I fixed this problem, and now it can package the AHK main program into a separate program.

@alware, Because script runs through named pipes, A_ScriptDir is useless.
You should use dir:=A_WorkingDir to get the used directory of the compiled program.