AHK源代码加密器 v3.3

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

Moderators: tmplinshi, arcticir

ziyujohnson
Posts: 1
Joined: 17 Jan 2019, 04:08

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

17 Jan 2019, 04:16

Feiyue您好,我在執行加密器時沒遇到任何問題,不過我將腳本.ahk拖曳至加密器UI後沒有任何作用,請問該問題如何解決
espetoet
Posts: 3
Joined: 05 Oct 2019, 13:32

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

05 Oct 2019, 13:44

feiyue wrote:
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.
Hello! where can i find the source code.
User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

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

27 Jan 2020, 14:39

If I encrypt my script, How can I un-encrypt my script in the future? Can I somehow use the togetcode(s) Function?
feiyue
Posts: 349
Joined: 08 Aug 2014, 04:08

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

30 Jan 2020, 15:55

Here is an example of getting the source code by yourself:
Tip: you must uncomment "; . togetcode(s)" from the encryptor script to enable togetcode(s)

Code: Select all

InputBox, password,, `n`nPlease input password:,,,,,,,, [email protected]
Msgbox, % Func("getcode").Call(password)
You can synchronously change the private password ([email protected])
in the encryptor script and user script to other strings.

------------------

Here is a more complex example:

Code: Select all


GetHash(s)
{
  hash:=0
  Loop, Parse, s
    hash:=( hash*31+Ord(A_LoopField) ) & 0xFFFFFFFF
  return hash
}

; Change the private password ([email protected]) in the encryptor script
InputBox, password,, `n`nPlease input password:,,,,,,,, [email protected]
Clipboard:=hash:=GetHash(password)
Msgbox, % "Please Change ([email protected]) to (3050302951): " hash

; Use the private password ([email protected]) in user script
InputBox, password,, `n`nPlease input password:,,,,,,,, [email protected]
Msgbox, % Func("getcode").Call( GetHash(password) )

User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

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

28 Feb 2020, 09:41

I want to report an issue regarding the encoded and compiled script.

When the script is encrypted and compiled, the msgbox funtion displays the default AHK icon.
When the script is compiled with no encryption, the msgbox displays the icon that I set. (Orange circle)

How can I make the encrypted and compiled msgbox display the icon of my choosing?


Compiled Script. (working msgbox icon)
Image


Encrypted and Compiled script. (msgbox icon not working)
Image


I was using the following code to test the icons. The icons were set using the compiler.

Code: Select all

#SingleInstance Force
Msgbox, 0x10, Icon Testing, This box is to test the icons.
return
All help is appreciated,
Thank you!
User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

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

28 Feb 2020, 11:23

I found a workaround for fixing the default icon on msgbox. See the code below.

Code: Select all

#SingleInstance Force
Gui, 99: Show ; There is no "GUI, 99" and will display nothing. This will allow the gui icon to appear.
Msgbox, 0x10, Icon Testing, This box is to test the icons.
	IfMsgbox Ok
	Gui, 99:Destroy ; Remove the icon
return
c7aesa7r
Posts: 209
Joined: 02 Jun 2016, 21:09

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

07 Mar 2020, 10:50

Sorry if its a dumb question, how easily this encryption could be cracked?
Also a doubt: The encrypted script remove all commented lines?
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

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

08 Mar 2020, 06:51

c7aesa7r wrote:
07 Mar 2020, 10:50
Sorry if its a dumb question, how easily this encryption could be cracked?
Also a doubt: The encrypted script remove all commented lines?
Very knowledgeable programmers and professionals (like those working at an Anti-Virus company) can likely figure it out. Where casual and non-professionals are very much less likely. That's usually true for almost any application, in any programming language. It counters overly easy decompiling and source inspection. If you are looking for higher levels of protection, you would have to learn AutoHotkey_H or buy very expensive professional products from 3rd party companies (and that might not stop high level hackers/crackers either). Overall, it's a great script and idea, that provides reasonable protection for AutoHotkey_L.
c7aesa7r
Posts: 209
Joined: 02 Jun 2016, 21:09

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

10 Mar 2020, 16:59

Why when i run the compiled source it generate a autohotkey.exe?
Is possible run the compiled .exe without making an ahk.exe?
User avatar
huyaowen
Posts: 109
Joined: 28 Jul 2014, 01:15

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

28 Mar 2020, 04:50

非常感谢,不懂原理,表示神奇。
norths1
Posts: 21
Joined: 12 Mar 2017, 03:06

Re: AHK source code encryptor v2.7

28 Mar 2020, 11:23

Your encryption technique is static, it's quite unsafe, so encrypted code can be easily reversed back.

SOTE wrote:
08 Mar 2020, 06:51
Very knowledgeable programmers and professionals
there's actually many different ways to decrypt it and you don't have to be a reverse engineer to do that.
User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

Re: AHK source code encryptor v2.7

28 Mar 2020, 12:59

SOTE wrote:
08 Mar 2020, 06:51
Very knowledgeable programmers and professionals
there's actually many different ways to decrypt it and you don't have to be a reverse engineer to do that.
[/quote]

Security measures can always be reverse engineered. This encryption adds an extra layer of protection to your script. It's also super easy to use, free and effective. Thanks a tone to @feiyue for developing such amazing software and providing it to the world for free.
norths1
Posts: 21
Joined: 12 Mar 2017, 03:06

Re: AHK source code encryptor v2.7

28 Mar 2020, 14:46

SirSocks wrote:
28 Mar 2020, 12:59
effective
i don't think so. it still requires further work to improve the encryption.
as i said, encryption should be at least dynamic, otherwise any regular user can encrypt two files, compare them and make a decryptor.
btw i made it just for 10 minutes.

ok i know that the OP shared his C source code, but really, nobody is gonna use it because most people don't realize that use of public protectors isn't a good idea. And anyway, you can just set a breakpoint on the decryption function.

SirSocks wrote:
28 Mar 2020, 12:59
This encryption adds an extra layer of protection to your script
That's the thing, it should be an "extra layer" but people still use it as a single one.
I decompiled and decrypted a lot of AHK scripts and have never seen anything special.
Obfuscation, I think, would be much better than anything else.

SirSocks wrote:
28 Mar 2020, 12:59
Thanks a tone to @feiyue for developing such amazing software and providing it to the world for free.
There are a lot of much stronger AHK protectors, but still all of them were hacked. As well as this one. This protector is easy-to-decrypt, this is why it's free.

SirSocks wrote:
28 Mar 2020, 12:59
Security measures can always be reverse engineered.
Indeed, debugging would be much easier here. You don't even have to decrypt it yourself, just set a breakpoint on "MyFunc" and that's it.
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: AHK source code encryptor v2.7

28 Mar 2020, 15:25

Double post. See Below.
Last edited by SOTE on 29 Mar 2020, 07:51, edited 1 time in total.
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: AHK source code encryptor v2.7

28 Mar 2020, 19:09

norths1 wrote:
28 Mar 2020, 11:23
Your encryption technique is static, it's quite unsafe, so encrypted code can be easily reversed back.
SOTE wrote:
08 Mar 2020, 06:51
Very knowledgeable programmers and professionals
there's actually many different ways to decrypt it and you don't have to be a reverse engineer to do that.
I'm not quite sure of the reason for the hostility and negativity. I never said this was unbreakable code or undefeatable. It's just something that non-programmers and casuals would have a more difficult time with. Not saying more advanced users can't find ways. For that matter, we can take compiled code (C/C++, Rust, Go, Pascal, Basic, etc...) and disassemble it back to Assembly code, then get pseudo C code. Some people can even read and understand the Assembly code directly, without going up to C. Others will go the route of snatching strings and resources out of compiled executables. The list of ways and tools go on and on.

The point was that Feiyue made a great script for casual protection against simplistic AutoHotkey decompilers and string snatching. The strong points of AutoHotkey (or its older interpreted language brother AutoIt) was never about high security, but high usability. If AutoHotkey users want more serious protection, they can try AutoHotkey_H or buy 3rd party protection tools. If they are that advanced as programmers, there are many inconvenient compiled languages for them to use and go through the trouble of learning, but those languages won't necessarily stop hackers/crackers either. Feiyue's script has achieved the initial success of being something free and easy to use for AutoHotkey_L, and hopefully will see more improvements in the future.
norths1
Posts: 21
Joined: 12 Mar 2017, 03:06

Re: AHK source code encryptor v2.7

28 Mar 2020, 19:11

SOTE wrote:
28 Mar 2020, 15:25
I'm not quite sure of the reason for the hostility and negativity.
what hostility and negativity are you talking about lmao? i'm not trying to be rude, I'm just saying.......

SOTE wrote:
28 Mar 2020, 15:25
I never said this was unbreakable code or undefeatable. It's just something that non-programmers and casuals would have a difficult time with.
not difficult at all in this case

SOTE wrote:
28 Mar 2020, 15:25
Some people can even read and understand the Assembly code directly, without going up to C
no big deal, this is a programming language too
some people can even read & understand bytecode, but in most cases it's pointless

SOTE wrote:
28 Mar 2020, 15:25
If AutoHotkey users want more serious protection, they can try AutoHotkey_H
note that you should rewrite its encryption method, otherwise using it just to hide your code is a bad idea
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: AHK source code encryptor v2.7

28 Mar 2020, 19:46

norths1 wrote:
28 Mar 2020, 19:11
SOTE wrote:
28 Mar 2020, 15:25
If AutoHotkey users want more serious protection, they can try AutoHotkey_H...
note that you should rewrite its encryption method, otherwise using it just to hide your code is a bad idea
As both AutoHotkey_L and AutoHotkey_H are open-source, to recompile the source with added security is very doable. Also, nobody is stopping anyone from deep diving into Assembly, C, or whatever. When it comes to security, what one person can think to do, another can think up a way to counter it. That's a never ending game, no matter the programming language or application. The long list of cracked applications is proof. But that also misses the point. Most people are not going to go that deep, nor are trying to become hackers, crackers, or criminal masterminds. A lock on the door, keeps honest people honest, it doesn't stop criminals that really want in. Usually, in the world of interpreted programming languages, it's about convenience and usefulness. There is always a balance of what people feel comfortable with, what they want to, and how much security they must have.
User avatar
Cuadrix
Posts: 236
Joined: 07 May 2017, 08:26

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

29 Mar 2020, 08:36

WHat if I want to include files?
feiyue
Posts: 349
Joined: 08 Aug 2014, 04:08

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

29 Mar 2020, 13:15

If you need to include files that are not confidential, you can continue to use the #include command:
#Include %A_AhkPath%\..\Lib\Gdip.ahk
Otherwise, copy the contents of the library file to your script.

如果需要包含的文件不用保密,你可以继续使用#Include命令,否则请自己复制库文件的内容到脚本中。
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: AHK source code encryptor v2.7

31 Mar 2020, 20:17

norths1 wrote:
28 Mar 2020, 19:11
SOTE wrote:
28 Mar 2020, 15:25
If AutoHotkey users want more serious protection, they can try AutoHotkey_H
note that you should rewrite its encryption method, otherwise using it just to hide your code is a bad idea
would you mind sharing how this is done? give like a small simple example and then i could build and expand upon? maybe in the AHK_H forum as its off topic for this thread.


Return to “脚本函数”

Who is online

Users browsing this forum: No registered users and 20 guests