AHK源代码加密器 v3.3

许多实用脚本和封装函数, 可以让您编写脚本更加便捷高效

Moderators: tmplinshi, arcticir

AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

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

07 Jun 2018, 17:59

feiyue wrote:@AHKStudent, I fixed this problem, and now it can package the AHK main program into a separate program.
Tested and it works :thumbup: :thumbup:
alware
Posts: 8
Joined: 01 Jun 2018, 02:25

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

08 Jun 2018, 13:59

i put this code at the beginning of my code but still doesn't work

SetWorkingDir %A_WorkingDir% ; Ensures a consistent starting directory.
feiyue
Posts: 348
Joined: 08 Aug 2014, 04:08

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

08 Jun 2018, 14:31

@alware, You need to re-encrypt the script ! :wave:
The initial working directory of the encrypted script (or compiled program) is the directory where the file is located.
For example, your script is in the D:\ directory, and your picture is in the same directory D:\001.jpg.
When you search for pictures, you can use the relative script path: "001.jpg".
I suggest that you use dir:=A_WorkingDir to save the script's working directory at the beginning of the script,
then you can use the absolute path of the picture: dir . "\001.jpg".
alware
Posts: 8
Joined: 01 Jun 2018, 02:25

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

08 Jun 2018, 21:58

feiyue wrote: @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.
works perfectly!!! Thank you so much! your code rocks!!!!!!!!!!!!!!!!!

reload() doesn't work ! any idea?
feiyue
Posts: 348
Joined: 08 Aug 2014, 04:08

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

08 Jun 2018, 22:38

@alware, You can test a simple script encryption.

Code: Select all

Msgbox, OK !
Esc::Reload()
FluffyMrKitty
Posts: 14
Joined: 24 May 2018, 19:43

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

09 Jun 2018, 15:09

Is there any way to have the encrypted script run without a tray icon?
feiyue
Posts: 348
Joined: 08 Aug 2014, 04:08

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

09 Jun 2018, 17:38

FluffyMrKitty wrote:Is there any way to have the encrypted script run without a tray icon?
add #NoTrayIcon
FluffyMrKitty
Posts: 14
Joined: 24 May 2018, 19:43

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

09 Jun 2018, 17:57

You're right. I just now noticed my stupid mistake. Sorry about that.
FluffyMrKitty
Posts: 14
Joined: 24 May 2018, 19:43

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

12 Jun 2018, 14:04

Would you be interested in figuring out why your encryption messes with this script's encryption/decryption? Frankly your work is beyond my current comprehension and I barely have a grasp on Laszlo's work.

Basically if I encrypt Laszlo's SW protection script with your script, I only get two unique fingerprints as opposed to a unique fingerprint for every machine.
feiyue
Posts: 348
Joined: 08 Aug 2014, 04:08

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

17 Jun 2018, 15:16

FluffyMrKitty wrote:Would you be interested in figuring out why your encryption messes with this script's encryption/decryption? Frankly your work is beyond my current comprehension and I barely have a grasp on Laszlo's work.

Basically if I encrypt Laszlo's SW protection script with your script, I only get two unique fingerprints as opposed to a unique fingerprint for every machine.
@FluffyMrKitty, You have found a good script, and I like it very much. :bravo:
I changed my script a little bit, upgraded to v2.2 version.
Deleted the #NoEnv statement (attached to the user script). :dance:

I suggest that you adjust the following code when you use Laszlo's script :

Code: Select all

dir:=A_WorkingDir
IniFile = %dir%\SafeSW.ini

Code: Select all

CheckAuth:
ListLines, Off
SetTimer,, Off
AHKtreasureland
Posts: 9
Joined: 12 Mar 2018, 10:30

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

23 Jun 2018, 15:16

thank you Fei, this is great stuff! Would it also work with AHK_H? would be great if it does. Thank you again!
FastLearner

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

07 Aug 2018, 19:20

as usual perfect scripts, fan of your "FindText" script :thumbup: :clap:

I'm also using the great laszlo's protection script so I need to hide any relevance on how this script/program was made or with what language.

Is there any way to not include the autohotkey master program when opening the compiled script?

or a way to hide ahk.exe icon and maybe encrypt it to hide it was made by which program?

Thank you very much :salute:
feiyue
Posts: 348
Joined: 08 Aug 2014, 04:08

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

26 Aug 2018, 18:26

更新到v2.5版本,提高了破解的难度,但还是防菜鸟防不了高手。
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

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

02 Oct 2018, 04:42

feiyue wrote:Updated to the V2.0 version, Enhance the difficulty of cracking. :superhappy:
Suggestions for additional security:

1) To possibly create a GUI, so a user can add a blacklist of cracking, debugger, or whatever programs. If the process of such cracking programs are found, then this causes the main program to exit.

2) Checksum or md5 hash check. Program performs a self check and/or consults database elsewhere, and if it's been altered from it's original state, tampered with, or hash doesn't match that of the database, will not run the main program.
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

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

12 Oct 2018, 04:24

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?
There are a lot of c and c++ open source code that you can compile into machine code or use, like NCrypt for example, https://sourceforge.net/projects/ncrypt/
Though there is a good point about not providing the source of the machine code, because then how much can you trust it? A lot of people will not use, if they don't know what is in the machine code.
thank you Fei, this is great stuff! Would it also work with AHK_H? would be great if it does. Thank you again!
AHK_H already has the ability to use encryption, Refer to https://autohotkey.com/boards/viewtopic.php?f=67&t=6013

However, that uses a default password to encrypt, and you must recompile the source code in order to change it. But for basic protection, you are set. This method is superior to obfuscation. And more so, once you figure out how to recompile source code. That is not to say that Feiyue's method, though fantastic, doesn't have some issues too. Like trusting the contents of the machine code or not giving the source used to generate the machine code... But I do think a hybrid method between what Feiyue and HotKeyIt have done might be possible. Where a function generates a random password or one chosen by the user, and where the source code is open, but it's not necessary to recompile it in order to encrypt protect scripts.

I think there is a place for this, as in businesses, schools, or IT departments that want to use AutoHotkey but are worried about their source code that has sensitive information (like passwords, server names, looking for porn in the work place, etc...) that can be exposed or it can be tampered with in unwanted ways by 3rd parties.
feiyue
Posts: 348
Joined: 08 Aug 2014, 04:08

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

03 Dec 2018, 21:52

由于只是为了阻止菜鸟获取源代码,所以目前我没有继续改进的思路。
这种加密方法对于高手还是很容易破解的,建议还是使用AHK_H的加密方式。

Because it's just to prevent newbies from getting the source code,
I don't have any ideas for further improvement at present.

This encryption method is easy to crack for the master.
It is suggested to use the encryption method of AHK_H.
feiyue
Posts: 348
Joined: 08 Aug 2014, 04:08

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

07 Dec 2018, 20:44

Updated to 2.7 version - 2018/12/08
1. Add togetcode() function, It is used to contain the user's script itself.
2. The C source code of the machine code has been published.
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

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

08 Dec 2018, 00:51

Well done. Teaches an informative lesson in coding and gives the user more options on how they want to construct or utilize this impressive script.
syko
Posts: 1
Joined: 12 Dec 2018, 23:47

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

12 Dec 2018, 23:49

Hi, What is the purpose of this tool?
In order to prevent a process (such as game-guard) from detecting AHK?
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

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

14 Dec 2018, 02:55

syko wrote:
12 Dec 2018, 23:49
Hi, What is the purpose of this tool?
In order to prevent a process (such as game-guard) from detecting AHK?
Your comment comes off as ill-informed, so I hope you are not trolling. If it was meant specifically for gaming, then it would be in the gaming section. It's an optional source code protection feature, that deters casual users from tampering and can possibly provide some security inside say a school or business, that is deploying AutoHotkey scripts on various machines. Many other programming languages that are interpreted or compiled into an intermediate form (such as C#, Java, or Python) utilize such protections (encryption or obfuscation). AutoHotkey is not compiled directly into machine code, like say C, C++, or Pascal. Thus it can be more easily "decompiled" (again like C#, Java, or Python) by 3rd parties.

As for GameGuard specifically, you can try, but nothing stops them from updating their program in response. Particularly if a hack or cheat gains any kind of popularity or they become aware of it. You are dealing with a company, that likely employs programming experts, that will be up to the task of developing a counter.

Return to “脚本函数”

Who is online

Users browsing this forum: No registered users and 16 guests