AHK_H V2 Source Rename command. Is it possible?

Ask for help, how to use AHK_H, etc.
bapl
Posts: 119
Joined: 17 Apr 2021, 00:24

AHK_H V2 Source Rename command. Is it possible?

Post by bapl » 09 Aug 2022, 21:59

Is it possible to somehow change the names of commands on the AHK_H V2 version, for example:

Before changing the command in Source:
Msgbox "Hello World"

After changing the command in Source:
fififififififfififififif "Hello World"

I tried to just change the names, but I got a crash.
What did I do wrong?

I've been thinking for a long time that obfuscating commands inside the Source project will complicate the readability and understanding of the written code.

User avatar
Animan8000
Posts: 56
Joined: 11 May 2022, 05:00
Contact:

Re: AHK_H V2 Source Rename command. Is it possible?

Post by Animan8000 » 10 Aug 2022, 03:30

Should be possible, if you change and reference the changes correctly accross all files and recompile it. The question remains: why obfuscate that??

bapl
Posts: 119
Joined: 17 Apr 2021, 00:24

Re: AHK_H V2 Source Rename command. Is it possible?

Post by bapl » 10 Aug 2022, 05:16

@Animan8000
@HotkeyIT Sorry to mention you, but I would like to know the answer.
To make the script difficult to read.
Code obfuscation.

Example:

Code: Select all

fifi fififi ; goto(1)
fifififififif() ; func(4)
{
fifififififi fifififififififi fififi ; fileread
fifififififififif := fifififififififi ; var := varfileread
fififififififi(fifififififififif) ; msgbox(varfileread)
}
fififi: ;lib(2)
fifififififif() ; func(3)
Agree it looks pretty confusing.

I tried to change the SoundBeep in all the documents, but in the end I got an error.

User avatar
Animan8000
Posts: 56
Joined: 11 May 2022, 05:00
Contact:

Re: AHK_H V2 Source Rename command. Is it possible?

Post by Animan8000 » 10 Aug 2022, 06:47

There's also libraries to obfuscate AHK Code, to a point where it isn't readable at all anymore. If you want I can look if I can find it again.

bapl
Posts: 119
Joined: 17 Apr 2021, 00:24

Re: AHK_H V2 Source Rename command. Is it possible?

Post by bapl » 10 Aug 2022, 06:51

@Animan8000
Any protection will be useful in the study.
So I'll be glad!

User avatar
Animan8000
Posts: 56
Joined: 11 May 2022, 05:00
Contact:

Re: AHK_H V2 Source Rename command. Is it possible?

Post by Animan8000 » 10 Aug 2022, 07:46

viewtopic.php?f=28&t=42494 was maybe this one. However keep in mind that this will increase filesize, RAM usage and possibly performance.

Alternatively you can use the optional encryption functionality in AHK_H when compiling a script.

However, I want to remind you that none of these methods are perfect and it shouldn't be too difficult cracking them for any "professional". In a language especially like AHK where compiled scripts are only the interpreter with the script file being injected inside in plain text, there's no actual too efficient script source code protection.

bapl
Posts: 119
Joined: 17 Apr 2021, 00:24

Re: AHK_H V2 Source Rename command. Is it possible?

Post by bapl » 10 Aug 2022, 07:51

@Animan8000
I've already seen it, but it didn't work for AHK_H V2.

Maybe I need to change the syntax.
However, it already has a bypass.
So the best solution would be to change the names of the teams.

User avatar
thqby
Posts: 397
Joined: 16 Apr 2021, 11:18
Contact:

Re: AHK_H V2 Source Rename command. Is it possible?

Post by thqby » 30 Aug 2022, 02:21

https://github.com/thqby/AutoHotkey_H/blob/alpha/source/script.cpp#L39
The entrance is here.
After renaming the function name, it needs to be arranged in order.
There are several macros used to associate the function name with the native function or ACT_XXX.
such as, BIFn(aaa, 1, 1, BIF_FloorCeil),BIFA(bbb, 0, 6, ACT_CLICK)

For keyword modification, you need to modify a lot of code.

Post Reply

Return to “Ask for Help”