Page 7 of 8
Re: AHK源代码加密器 v3.2
Posted: 09 Nov 2021, 04:33
by GreenLeafGL4
i encrypted my script with the encrytor, however whenever i open the encoded file it shows the following message
Script file not found:
\\.\pipe\AHKXXXXXXXX
The XXXXXXXX varies every time, but it always give me this error message whenever i try to open my encoded ahk file, do you have any idea about how to solve this
Re: AHK源代码加密器 v3.2
Posted: 22 Nov 2021, 04:42
by DarkSider
Hi, the script works but i'm trying to make it work on a file which should be executed as administrator. I got this test script which works both as .ahk or compiled before encrypting. However after encryption, i get the same error as user above me
Code: Select all
#Singleinstance Force
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
}
j::
{
if A_IsAdmin
msgbox, works
return
}
Re: AHK源代码加密器 v3.0
Posted: 26 Nov 2021, 04:04
by Logitope
Dystopia wrote: ↑26 Jun 2020, 12:08
1) When encoded, the name of my script in the taskbar changes to a seemingly random string. Can I make it retain the original name of my script?
It seems no one ever answered this question? Include the following line in your script:
Menu, Tray, Tip, [Desired Name]
Re: AHK源代码加密器 v3.2
Posted: 27 Nov 2021, 07:03
by Recca
GreenLeafGL4 wrote: ↑09 Nov 2021, 04:33
i encrypted my script with the encrytor, however whenever i open the encoded file it shows the following message
Script file not found:
\\.\pipe\AHKXXXXXXXX
The XXXXXXXX varies every time, but it always give me this error message whenever i try to open my encoded ahk file, do you have any idea about how to solve this
I am also having the same problem with this Script file not found error
Re: AHK源代码加密器 v3.2
Posted: 27 Nov 2021, 10:31
by feiyue
Don't use A_ScriptDir, but use A_ScriptDir2. Don't use Reload, but use Reload().
Re: AHK源代码加密器 v3.2
Posted: 11 Dec 2021, 10:00
by GreenLeafGL4
@feiyue
i already typed the following statement in my script
SetWorkingDir %A_ScriptDir2%
but it still shows the same error message
did i miss any steps or do anything wrong?
Re: AHK源代码加密器 v3.2
Posted: 28 Mar 2022, 15:20
by Neresho
Hello,
I was looking for a solution since a long time, I tried many things (by trying to debug it by myself)
And with A_ScriptDir2, it seems to be a blank value (cf :
https://ibb.co/tDXp4jd) (DirTo := A_ScriptDir2) (I've also tried with DirTo = %A_ScriptDir2% and not working too) (Even if I use A_ScriptDir2\exe\Keygen_moi.exe)
Re: AHK源代码加密器 v3.2
Posted: 08 Apr 2022, 09:13
by henriquehassi
hello @feiyue i was looking your script, and its amazing, but i have one doubt, i already encrypted my script, and how can i decrypt that? i saw that have one part in your code to decrypt, but how i use that correctly?
Re: AHK源代码加密器 v3.2
Posted: 13 Apr 2022, 12:21
by homezonebenny
I have a script which will be compiled to an .exe file.
But this script needs to put a "sdelete64.exe" file into the user %temp% path.
You do that with:
Code: Select all
FileInstall, sdelete64.exe, %temp%\sdelete64.exe, 1
But if you Encrypt this script now with the method of this post, nothing happening anymore.
There will be no file in:
You can replicate this with any other .exe file for example.
Compile a script with the code above and a dummy.exe and execute the compilede.exe file.
This will put your dummy.exe into %temp%!
But if you encode it, and then compile it, nothing happens!
And the
normal compiled.exe got a different "right click menu" see image:
The normal one only got 3 menu points, "Suspend Hotkeys", "Pause", "Exit".
That's what I want.
The encrypted variant gets the WHOLE Autohotkey menu stuff, I try to prevent...
Any ideas?
Basically the normal compile method is great, putting my "sdelete64.exe" into users %temp% folder and the menu only got those 3 points!
BUT it's decompile able with payload.dll where this posts encrypt comes into play.
But those 2 issues are stopping me from completing the mission.
Re: AHK源代码加密器 v3.2
Posted: 14 Apr 2022, 04:18
by feiyue
1. Release file: Do not use FileInstall in the source file, but use FileInstall in the encrypted script.
2. Customize tray menu: First clear the default menu, and then add custom menus.
Code: Select all
Menu, Tray, NoStandard
Menu, Tray, Add, Suspend Hotkeys, MySuspend
Menu, Tray, Add, Pause Script, MyPause
Menu, Tray, Add, Exit, MyExit
MySuspend() {
Suspend
}
MyPause() {
Pause,, 1
}
MyExit() {
ExitApp
}
Re: AHK源代码加密器 v3.2
Posted: 14 Apr 2022, 11:17
by homezonebenny
Wow, thanks for the quick response!
If you open the compiled .exe file with Notepad++ you can find something like this in it:
Code: Select all
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:v3="urn:schemas-microsoft-com:asm.v3"><assemblyIdentity version="1.1.00.00" name="AutoHotkey" type="win32" />
Do you know how to change the
to something else since this could give a hint what this program is or better said how to decompile?!
Re: AHK源代码加密器 v3.2
Posted: 14 Apr 2022, 17:17
by TAC109
See the compiler directive
UpdateManifest. This directive needs to be processed by Ahk2Exe and so must be in the source that is processed by the compiler.
Cheers
Re: AHK源代码加密器 v3.2
Posted: 26 Apr 2022, 11:20
by lhgqcvxacdapecceuq
writes that I was successful and where can I find this file encrypt?
because he didn't show up.
https://ibb.co/mBsJyZT screenshot
Re: AHK源代码加密器 v3.2
Posted: 22 May 2022, 13:07
by underbe
ive read this whole thread and seen a few people ask but i didnt really understand the answers... can someone hold my hand and explain how to find the running files name please? unencrypted i can use A_ScriptName but once encrypted it seems to return random character as previous users have said.
here is an example of the code ive been having issues with.
postdata=
(
{
"content": "%A_ScriptName% STOPPED on server %ServerName% (%ServerIP%) by %A_UserName% (%A_ComputerName%)"
}
)
Re: AHK源代码加密器 v3.2
Posted: 24 May 2022, 21:58
by feiyue
EnvGet, file, My_ScriptFullPath
global A_ScriptFullPath2:=file
global A_ScriptDir2:=RegExReplace(file, "\\[^\\]*$")
global A_ScriptName2:=RegExReplace(file, "^.*\\")
Re: AHK源代码加密器 v3.2
Posted: 25 May 2022, 15:18
by underbe
tyvm sir
Re: AHK源代码加密器 v3.2
Posted: 28 May 2022, 18:41
by GiandosoG
@feyue
Please help me. I'm not able to fit your script together with Laszlo in any way. I tried to do what you said at the beginning of this topic and I couldn't. The script does not load. an example of part of my script is like this:
Code: Select all
F1::
vaidnv:
Random, tempoLoop, 36093, 37141
Loop % tempoLoop
{
PixelSearch, x, y, 0, 0, A_ScreenWidth, A_ScreenHeight, 0xD8385A,, RGB Fast ; marcação tiuzin cor runelite FFEA274C
if (ErrorLevel = 0)
{
Random, movimentoMouse, 10, 12
SetMouseDelay, %movimentoMouse%
auxX:= x+random(1, 6)
auxY:= y+random(7, 17)
tempo(65, 90)
Click, %auxX%, %auxY%
ImageSearch, x, y, 414, 37, 751, 109, *15 C:\Users\user\Desktop\bot ahk\bot thiev\Knight ardy\+dobank.png ;reconhece q ta no bank
if (ErrorLevel = 0)
{
Send, {Esc}
}
}
[Mod edit: [code][/code] tags added.]
and I already inserted Laszlo's script in it. Please help me
Re: AHK源代码加密器 v3.2
Posted: 29 Aug 2022, 06:25
by sama
#Include xxx.ahk
不包括任何文件.
Re: AHK源代码加密器 v3.2
Posted: 07 Sep 2022, 00:37
by ibieel
is there any way to allow the encrypted script to run on "SingleInstance, OFF" ?
I already changed in every script, but it keeps closing what is already open to open another one.
Re: AHK源代码加密器 v3.2
Posted: 03 Dec 2022, 02:24
by wyrover
有点费劲啊,ahk 源码有,自己编译一个,在关键函数上写一个 _asm {int 3} ,然后附加调试器调试, 断在关键函数加载脚本处,观察上下文,弄一个字节序列匹配,然后写个 hook 输出源码缓冲区。
关键功能还是 C++ 实现吧。