AHK源代码加密器 v3.4

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

Moderators: tmplinshi, arcticir

feiyue
Posts: 381
Joined: 08 Aug 2014, 04:08

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

Post by feiyue » 21 Oct 2020, 21:15

If you use a continuation section larger than 16,383 characters,
an error message will appear: "Continuation section too long"

Code: Select all

fs=
(` %
...... too long > 16,383
)
It can be modified as follows: :dance:

Code: Select all

fs=
(` %
...... not too long < 16,383
)
fs=%fs%
(` %
...... not too long < 16,383
)
djuga
Posts: 88
Joined: 28 Jul 2019, 08:16

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

Post by djuga » 22 Oct 2020, 00:00

....
Last edited by djuga on 11 Nov 2021, 07:09, edited 2 times in total.
My questions are baffling! :crazy:
djuga
Posts: 88
Joined: 28 Jul 2019, 08:16

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

Post by djuga » 24 Oct 2020, 11:08

....
Last edited by djuga on 11 Nov 2021, 07:09, edited 1 time in total.
My questions are baffling! :crazy:
djuga
Posts: 88
Joined: 28 Jul 2019, 08:16

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

Post by djuga » 05 Nov 2020, 23:02

....
Last edited by djuga on 11 Nov 2021, 07:09, edited 1 time in total.
My questions are baffling! :crazy:
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

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

Post by SOTE » 06 Nov 2020, 04:36

djuga wrote:
24 Oct 2020, 11:08
Google drive detect virus in compiled script in version 3.1, in ver 2.7 all ok, how to fix it?
My program auto update from google drive :(

I check it in virustotal

Version 3.1 ->
1.SecureAge APEX - Malicious (Its ok)
2.ESET-NOD32 - Win32/AHK.CU
3.Microsoft - Trojan:Win32/Wacatac.C!ml

Version 2.7 ->
1.SecureAge APEX - Malicious (Its ok)
This can be a false positive. In the case of Microsoft, one can get a decision about this in 24 hours. You would upload your executable to them, they give you a tracking number, and then they tell you what they think. You can also comment that you believe it's a false positive.
https://www.autohotkey.com/boards/viewtopic.php?f=17&t=62266
(for more information and Anti-Virus vendors)

If you are using Windows Defender, you can check "History", "Quarantined Items", and "View Details". There is also the possibility that the issue is with the browser and Google Safe Browsing, which is used by Chrome and Firefox. It can prevent the browser from downloading the program. The user thinks they have downloaded it, but it's being blocked by the browser, so doesn't appear on the hard drive like the user expects.

Also, make sure that your AutoHotkey.exe file is authentic and comes from this website or the official GitHub.
djuga
Posts: 88
Joined: 28 Jul 2019, 08:16

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

Post by djuga » 11 Nov 2020, 04:39

....
Last edited by djuga on 11 Nov 2021, 07:10, edited 1 time in total.
My questions are baffling! :crazy:
Densdix
Posts: 1
Joined: 02 Dec 2020, 19:13

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

Post by Densdix » 02 Dec 2020, 19:30

Hello, I'm a beginner trying to use this to encode some stuff, and while it works, I have some questions:
1) When encoded, the name of my script in the taskbar changes to a seemingly random string, like in the picture below.
image.png
image.png (3.76 KiB) Viewed 13420 times
and when I'm using Reload command I have an error
image.png
image.png (4.01 KiB) Viewed 13418 times
Can I make it retain the original name of my script?
Thanks in advance for any help!
djuga
Posts: 88
Joined: 28 Jul 2019, 08:16

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

Post by djuga » 26 Dec 2020, 02:02

....
Last edited by djuga on 11 Nov 2021, 07:10, edited 1 time in total.
My questions are baffling! :crazy:
zuzu_kuc
Posts: 76
Joined: 30 Mar 2016, 12:36

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

Post by zuzu_kuc » 29 Jan 2021, 15:47

hi,
any idea why is the script immediately deleted? i can see encoded file, but only 1 sec. Then is deleted :/
EDIT - Karpensky!! antivirus - solved
night
Posts: 1
Joined: 29 Mar 2021, 15:01

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

Post by night » 29 Mar 2021, 15:31

First of all, congratulations @feiyue for the wonderfull job you did here. It solves one of the biggest problems in the distribution of executables made with autohotkey.

I'm having a problem using the version 3.1 of your script. I can't manage to keep my scripts title after I encode the script. I've tried to use @djuga 's tip to insert "EnvGet, My_ScriptName , My_ScriptFullPath" after " add= (` % ;----------------------- ListLines, Off", but it didn't work. I've also read the entire topic and didn't found a solution. Can you help me or point a direction?

Thank you!

Edit: Don't know how, but it solved itself. I was facing another problem that I've managed to solve, so here is the way in case anyone faces the same:

Problem: When I encrypt the script, all the graphics used in not-english texts (like é, á, ã, ç) were incorrect encoded.
Solution: Just opened my script in Notepad before encrypt and saved it as UTF-16 LE. Now everything looks right after encrypt.
jollyjoe
Posts: 45
Joined: 13 Feb 2021, 18:51

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

Post by jollyjoe » 11 May 2021, 04:09

SORRY FOR REVIVING AN OLD POST

I have a problem, when I encrypt my script which has #SingleInstance Off in it (to run multiple instances), it forces the script to #SingleInstance Force. I've tried everything, still, the script only runs in a single instance

Thanks in advance for the help
Lazyyy
Posts: 55
Joined: 27 Jan 2020, 21:56

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

Post by Lazyyy » 31 May 2021, 17:57

is it possible to remove the "click Drag the AHK script" to a fixed directory? I want to set %A_WorkingDir%/script.ahk inside the encryptor to just run it and the script.ahk be encrypted without the need to click and drag
AnggaHK
Posts: 1
Joined: 03 Aug 2021, 04:45

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

Post by AnggaHK » 03 Aug 2021, 05:06

Anyone can help me how to fix this?
image.png
(10.2 KiB) Downloaded 203 times
TAC109
Posts: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

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

Post by TAC109 » 03 Aug 2021, 23:12

I believe that the version of AutoHotkey that is used to run the encrypted program must be the same as the version used to create it.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
viet77
Posts: 5
Joined: 05 Nov 2020, 19:13

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

Post by viet77 » 19 Aug 2021, 00:13

Hi feiyue,
I like to use reboot command scrip , how, pls tell me,

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

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

Post by SirSocks » 19 Aug 2021, 21:34

@viet77 as mentioned in the documentation.....
When you want to Reload your own script, the built-in Reload command will fail, You can use Reload() function instead (it's added when encrypted).
feiyue
Posts: 381
Joined: 08 Aug 2014, 04:08

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

Post by feiyue » 21 Sep 2021, 23:36

@TAC109 :beer: :dance:
You're right. I updated it and added your memory cleaning protection code.
TAC109
Posts: 1154
Joined: 02 Oct 2013, 19:41
Location: New Zealand

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

Post by TAC109 » 21 Sep 2021, 23:50

Cheers!
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
User avatar
ibieel
Posts: 217
Joined: 17 Oct 2021, 23:30

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

Post by ibieel » 24 Oct 2021, 00:41

I tried to encrypt my AHK Script but gave this error when opening.
image.png
image.png (5.27 KiB) Viewed 8994 times
I think there is a problem with this line of code. what can i change here? Can someone help me?

Code: Select all


; [RUN ADMINISTRADOR] ===========================================================================
	
	full_command_line := DllCall("GetCommandLine", "str")
	if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)")) {
		try
		{
			if A_IsCompiled
				Run *RunAs "%A_ScriptFullPath%" /restart
			else
				Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
		}
		ExitApp
	}

	; END [RUN ADMINISTRADOR] ===========================================================================

User avatar
ibieel
Posts: 217
Joined: 17 Oct 2021, 23:30

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

Post by ibieel » 24 Oct 2021, 01:51

feiyue wrote:
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:,,,,,,,, abc@123.com
Msgbox, % Func("getcode").Call(password)
You can synchronously change the private password (abc@123.com)
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 (abc@123.com) in the encryptor script
InputBox, password,, `n`nPlease input password:,,,,,,,, abc@123.com
Clipboard:=hash:=GetHash(password)
Msgbox, % "Please Change (abc@123.com) to (3050302951): " hash

; Use the private password (abc@123.com) in user script
InputBox, password,, `n`nPlease input password:,,,,,,,, abc@123.com
Msgbox, % Func("getcode").Call( GetHash(password) )


do I need to change this password "abc@123.com" so that no one can decrypt my script?

or I only need to deal with this if I remove the comment "

Code: Select all

 ; . togetcode(s)
"

if I understand, the function to decrypt is disabled by default right?
Post Reply

Return to “脚本函数”