AHK源代码加密器 v2.6

许多实用脚本和封装函数, 可以让您编写脚本更加便捷高效
AHKStudent
Posts: 308
Joined: 05 May 2018, 12:23

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

Post by AHKStudent » 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

Post by alware » 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: 119
Joined: 08 Aug 2014, 04:08

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

Post by feiyue » 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

Post by alware » 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: 119
Joined: 08 Aug 2014, 04:08

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

Post by feiyue » 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

Post by FluffyMrKitty » 09 Jun 2018, 15:09

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

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

Post by feiyue » 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

Post by FluffyMrKitty » 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

Post by FluffyMrKitty » 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: 119
Joined: 08 Aug 2014, 04:08

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

Post by feiyue » 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

Post by AHKtreasureland » 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

Post by FastLearner » 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: 119
Joined: 08 Aug 2014, 04:08

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

Post by feiyue » 26 Aug 2018, 18:26

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

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

Post by SOTE » 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: 152
Joined: 15 Jun 2015, 06:21

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

Post by SOTE » 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.
Post Reply

Return to “脚本函数”