Upcoming Ahk2Exe Changes (2019)

Post your working scripts, libraries and tools
User avatar
joedf
Posts: 7646
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

Re: Upcoming Ahk2Exe Changes (2019)

31 Oct 2019, 09:19

@lexikos Is the uppercase crucial or can that be changed without issue?
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x8GB G.Skill RipJaws V - DDR4 3280 MHz | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]
User avatar
Drugwash
Posts: 746
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: Upcoming Ahk2Exe Changes (2019)

31 Oct 2019, 12:38

Simple test: open some executable in Resource Hacker, try to add anything - say a text file - as RC_DATA and see how the resource name appears. Delete the name and try typing lowercase. Draw a conclusion. ;)
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
User avatar
JoeWinograd
Posts: 1507
Joined: 10 Feb 2014, 20:00

Re: Upcoming Ahk2Exe Changes (2019)

31 Oct 2019, 13:06

gregster wrote:so, heuristically your exe might look more risky than others to them, right from the start
Interesting point...hadn't thought of that.
Drugwash wrote:However, variations on "Hello world" may well be on the black list; have you tried other more sensible names in the Manifest?
Good call! I tried it with one of my real programs...no problem! Went through the same procedure with the same code as I had used in HelloWorld...no detection this time.
Drugwash wrote:You may submit your exes to VirusTotal for analysis
I do submit my Setup.exe files to VT and recently submitted a false-positive report to one of the A-V products that VT flagged. I was stunned to get the following reply:
Hello and thank you for submitting. Your case 12345 has been closed. The submitted content was confirmed to be a false positive and will be fixed in an upcoming definition update.
Drugwash wrote:also mention that option in a ReadMe file and/or other places related to the distribution of your exes
Yes, I put a section in all my user guides/manuals called "Anti-Virus/Anti-Malware False Positives". I mention VirusTotal in the section and even have a couple of quotes from them, including this beauty: "False positive detections are common in the antivirus industry. They occur when a benign program is wrongfully flagged as malicious due to an overly broad detection signature or algorithm used in an antivirus product." Even so, it still spooks a lot of users...besides, who reads the doc? :)
lexikos wrote:I think that resource names with lower-case letters don't work (maybe for specific APIs or situations?).
Yes, found that out during my first test with a real program...used upper and lower case...no joy...but I'm fine with all upper case.

Thanks to everyone for all the feedback. Regards, Joe
TAC109
Posts: 534
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2019)

31 Oct 2019, 14:51

lexikos wrote:
31 Oct 2019, 04:27
TAC109 wrote:
29 Oct 2019, 23:00
Note that the replacement string needs to be filled with spaces to be the same size as the search string.
Can't you just write a null-terminator (write StrLen + 1 characters)? Of course, the replacement still can't be longer than the search string.

(For all I know, there might be some reason you can't use a shorter string.)
I tried a null-terminated string, but the compiled exe couldn’t find the embedded script, whereas space-filling to the original size worked.
My programs:-
ReClip - a Text Reformatting and Clip Management utility
XRef - Produces Cross Reference lists for scripts
User avatar
JoeWinograd
Posts: 1507
Joined: 10 Feb 2014, 20:00

Re: Upcoming Ahk2Exe Changes (2019)

31 Oct 2019, 19:15

A quick update to let you know that I switched two of my programs to Beta_7 using many of the SetProp directives, UpdateManifest (to replace name and version), AddResource (to replace the 160, 206, 207, 208 icons), and PostExec with BinMod (to replace the RCData entry). Everything worked perfectly on both programs. I used NSIS to create a Setup.exe that included the EXE from each Beta_7 compile and both the installer and the installed program ran on W7 with no detections by MBAM or MSE, and on W10 with no detections by Defender. Great job by TAC109 and everyone who helped! Regards, Joe
TAC109
Posts: 534
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2019)

31 Oct 2019, 20:16

@JoeWinograd
I’m pleased it’s working out for you! :thumbup:

I’ve found another use for BinMod; to alter a UPX compressed .exe so that it can’t be de-compressed with UPX -d. This will involve a small enhancement to Ahk2Exe, which I’ll get onto after I’ve finished wrestling with GitHub!

I also wish to add the UPX parameter to stop it compressing the icons. This was a request of yours, joe?

Cheers
My programs:-
ReClip - a Text Reformatting and Clip Management utility
XRef - Produces Cross Reference lists for scripts
User avatar
JoeWinograd
Posts: 1507
Joined: 10 Feb 2014, 20:00

Re: Upcoming Ahk2Exe Changes (2019)

31 Oct 2019, 22:21

I’ve found another use for BinMod; to alter a UPX compressed .exe so that it can’t be de-compressed with UPX -d.
Interesting idea! I had been unaware of the -d option on UPX until you mentioned it earlier in this thread. Would be very nice if it weren't so easy to de-compress a UPX.
I also wish to add the UPX parameter to stop it compressing the icons. This was a request of yours, joe?
Yes, I mentioned that, because when I experimented with UPX, RH showed only Group 159 in the EXE, and after creating a shortcut to the EXE and doing Properties>Change Icon on the shortcut, it said that the file contains no icons. lexikos then pointed out that it's due to the compression of resources, which occurs along with the compression of the script text. At that point, I mentioned that I decided to stick with MPRESS, which was working well with AddResource (for the icons) in Beta_7. I've gone back and forth over the years with MPRESS versus UPX, but lately (since UPX v3.95, 26-Aug-2018) have had fewer false positives with MPRESS. Would certainly be happy to give UPX another try if you can prevent -d from de-compressing. Thanks, Joe
guest3456
Posts: 3109
Joined: 09 Oct 2013, 10:31

Re: Upcoming Ahk2Exe Changes (2019)

01 Nov 2019, 10:59

JoeWinograd wrote:
31 Oct 2019, 13:06
I do submit my Setup.exe files to VT and recently submitted a false-positive report to one of the A-V products that VT flagged. I was stunned to get the following reply:
Hello and thank you for submitting. Your case 12345 has been closed. The submitted content was confirmed to be a false positive and will be fixed in an upcoming definition update.
i've been submitting my setup.exe's to AV vendors for years, and it usually works, they update their definitions. the problem is, they only seem to whitelist an individual file, instead of doing some actual research and figuring out the heuristic. that means with each new setup.exe version, i had to re-submit it again

i typically used this page:

https://www.techsupportalert.com/content/how-report-malware-or-false-positives-multiple-antivirus-vendors.htm

User avatar
JoeWinograd
Posts: 1507
Joined: 10 Feb 2014, 20:00

Re: Upcoming Ahk2Exe Changes (2019)

01 Nov 2019, 12:44

guest3456 wrote:the problem is, they only seem to whitelist an individual file
Good to know...I was wondering about that. I update my software fairly often (most of my programs have a Check for Update menu pick), so having to submit each updated Setup.exe file is a real pain, but I'll certainly do it.
guest3456 wrote:i typically used this page
Thanks for that link! I was unaware of the ability to submit false positives to multiple A-V Vendors at once...very nice!

Btw, I wasn't ignoring your earlier suggestion about AutoHotkey_H. I downloaded it to try, but ran into problems with both MBAM and MSE (see attached files). I was thinking about whitelisting it, but got very concerned about moving forward with it when I saw this post:

https://www.autohotkey.com/boards/viewtopic.php?f=65&t=68608#p295278

I'm fine with explaining away to my users 2 or 3 false positives out of 60+ vendors, but 22 makes it a whole different ballgame (and I create a 32-bit version of all my programs). So, I decided not to pursue AutoHotkey_H further, combined with the fact that the main AutoHotkey branch with TAC109's Ahk2Exe (and MPRESS) is working well now. Regards, Joe
Attachments
AutoHotkey_H-mse-virus-detected.png
AutoHotkey_H-mse-virus-detected.png (52.68 KiB) Viewed 3862 times
AutoHotkey_H-mbam-virus-detected.txt
(1.37 KiB) Downloaded 51 times
guest3456
Posts: 3109
Joined: 09 Oct 2013, 10:31

Re: Upcoming Ahk2Exe Changes (2019)

01 Nov 2019, 19:11

JoeWinograd wrote:
01 Nov 2019, 12:44
Btw, I wasn't ignoring your earlier suggestion about AutoHotkey_H. I downloaded it to try, but ran into problems with both MBAM and MSE (see attached files). I was thinking about whitelisting it, but got very concerned about moving forward with it when I saw this post:

https://www.autohotkey.com/boards/viewtopic.php?f=65&t=68608#p295278

I'm fine with explaining away to my users 2 or 3 false positives out of 60+ vendors, but 22 makes it a whole different ballgame (and I create a 32-bit version of all my programs). So, I decided not to pursue AutoHotkey_H further, combined with the fact that the main AutoHotkey branch with TAC109's Ahk2Exe (and MPRESS) is working well now. Regards, Joe
i saw that thread. it is concerning to me too, because i was planning on migrating my software to AHK_H soon (i currently still use AHK Basic so that i can protect my source with the HotkeyCamo compiler).

an alternative i used for one project was to distribute an AHK Basic wrapper program to my users (protected with HotkeyCamo), which sole purpose was to download an encrypted script txt file from my server, and then i would run that script through ahk.dll - that way i got _L/_H functionality through the .dll, and the executable was just an AHK_Basic file. i may go that route if necessary

TAC109
Posts: 534
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2019)

01 Nov 2019, 19:26

Well, I've managed to beat GitHub into submission! As a result, the location for Beta_7 has changed.
Please see the first post on page 1 for the new download address.
Cheers
My programs:-
ReClip - a Text Reformatting and Clip Management utility
XRef - Produces Cross Reference lists for scripts
User avatar
Drugwash
Posts: 746
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: Upcoming Ahk2Exe Changes (2019)

02 Nov 2019, 04:31

URL shorteners? Never! I wanna see clearly where I'm being sent before getting there.
Not to mention advertising and delays introduced by a possible interim page redirector.
Not to mention the security risk if the shortened link somehow gets hacked and users click it in good faith.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
User avatar
JoeWinograd
Posts: 1507
Joined: 10 Feb 2014, 20:00

Re: Upcoming Ahk2Exe Changes (2019)

02 Nov 2019, 17:37

TAC109 wrote: I've managed to beat GitHub into submission!
Congrats! :)
Drugwash wrote:I wanna see clearly where I'm being sent before getting there.
URL Expander is your friend for this (and clean, according to URLVoid). Using that, the long URL is:

https://github.com/TAC109/Ahk2ExeT/releases/tag/1.1.30.03_beta_7

Regards, Joe
User avatar
JoeWinograd
Posts: 1507
Joined: 10 Feb 2014, 20:00

Re: Upcoming Ahk2Exe Changes (2019)

02 Nov 2019, 18:06

guest3456 wrote:an alternative i used for one project was to distribute an AHK Basic wrapper program to my users (protected with HotkeyCamo), which sole purpose was to download an encrypted script txt file from my server, and then i would run that script through ahk.dll - that way i got _L/_H functionality through the .dll, and the executable was just an AHK_Basic file.
Very clever! I never heard of HotkeyCamo. I just went through all 13 pages at this HotkeyCamo thread on the archived forums. I see that yours was the last post there...four years ago! Is there a more recent thread about it? Thanks, Joe
TAC109
Posts: 534
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2019)

02 Nov 2019, 19:18

@joedf
Joe, I’ve created a fork of Ahk2Exe under TAC109 on GitHub and am editing via my pc to there. I’m having problems pulling to AutoHotkey/Ahk2Exe. I did one and it seems ok, but when I try to do the next it wants to include the first pull! Help!
(Can I message you directly somehow? I couldn’t see how to message on GitHub).

@JoeWinograd
FYI I’m making some changes to Ahk2Exe, including making compression a DLL in the GUI, and sorting out the destination field.

Cheers
My programs:-
ReClip - a Text Reformatting and Clip Management utility
XRef - Produces Cross Reference lists for scripts
User avatar
JoeWinograd
Posts: 1507
Joined: 10 Feb 2014, 20:00

Re: Upcoming Ahk2Exe Changes (2019)

02 Nov 2019, 19:45

making compression a DLL in the GUI
Hmmm...what's the purpose of this?
sorting out the destination field
Sorry...not unserstanding this, either.
TAC109
Posts: 534
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Upcoming Ahk2Exe Changes (2019)

02 Nov 2019, 20:06

@JoeWinograd
DLL = dropdown list. ('Compress exe with' in the GUI.)
Destination field on the GUI; There were some problems with the default destination shown when selecting a folder.
Both these were concerns of yours, I believe.
Cheers
My programs:-
ReClip - a Text Reformatting and Clip Management utility
XRef - Produces Cross Reference lists for scripts
guest3456
Posts: 3109
Joined: 09 Oct 2013, 10:31

Re: Upcoming Ahk2Exe Changes (2019)

02 Nov 2019, 20:16

JoeWinograd wrote:
02 Nov 2019, 18:06
Very clever! I never heard of HotkeyCamo. I just went through all 13 pages at this HotkeyCamo thread on the archived forums. I see that yours was the last post there...four years ago! Is there a more recent thread about it? Thanks, Joe
nope, that thread from the old forums is the only one.. that compiler offered decent protected for AHK Basic scripts, much better than just the basic pw
TAC109 wrote:
02 Nov 2019, 19:18
@joedf
Joe, I’ve created a fork of Ahk2Exe under TAC109 on GitHub and am editing via my pc to there. I’m having problems pulling to AutoHotkey/Ahk2Exe. I did one and it seems ok, but when I try to do the next it wants to include the first pull! Help!
(Can I message you directly somehow? I couldn’t see how to message on GitHub).
if you don't know what you're doing, you shouldn't be pushing directly to the repo. instead, you should fork into your own account, and then do pull requests from your fork back into the main repo
edit: ok i just looked, and that's what you're doing already. but PR #59 includes the same file as you already merged with PR #58. the reason is because you are pushing all your changes to the master branch. you shouldn't be doing that. you should be creating a new branch for each new feature, and then doing a pull request from your specific branch into the master branch of the main repo
alternatively, you could re-sync your fork with the main repo, and then push your changes to your master, and then do the PR, and then resync again

are you using git command line on your machine? or are you using the github software?
Last edited by guest3456 on 02 Nov 2019, 20:20, edited 1 time in total.

User avatar
JoeWinograd
Posts: 1507
Joined: 10 Feb 2014, 20:00

Re: Upcoming Ahk2Exe Changes (2019)

02 Nov 2019, 20:19

DLL = dropdown list. ('Compress exe with' in the GUI.)
Got it. Problem is, DLL=dynamic link library. I would have had it with DDL. :) Yes, that was mine...much better than the tri-state checkbox, imo.
some problems with the default destination shown when selecting a folder
Ah, yes, the folder wasn't sticky...that was mine, too.
guest3456
Posts: 3109
Joined: 09 Oct 2013, 10:31

Re: Upcoming Ahk2Exe Changes (2019)

02 Nov 2019, 20:37

TAC109 wrote:
02 Nov 2019, 19:18
@joedf
Joe, I’ve created a fork of Ahk2Exe under TAC109 on GitHub and am editing via my pc to there. I’m having problems pulling to AutoHotkey/Ahk2Exe. I did one and it seems ok, but when I try to do the next it wants to include the first pull! Help!
(Can I message you directly somehow? I couldn’t see how to message on GitHub).
here's what i suggest if you're using the git bash command line:
guest3456 wrote:
02 Nov 2019, 20:16
alternatively, you could re-sync your fork with the main repo, and then push your changes to your master, and then do the PR, and then resync again
with this method, you wouldn't be using separate branches for new features, but rather keeping everything in master branch. so do this on your local machine:

1. git checkout master
2. copy the 2 files from this commit (Ahk2Exe.ahk and Compiler.ahk) and copy them to a separate folder so we can preserve the changes
3. revert your master branch 2 commits to undo your changes with git reset --hard HEAD~2
4. then sync your local machine copy with the main repo with git pull upstream master. this assumes you've set the 'upstream' repo to match github.com/AutoHotkey/Ahk2Exe
5. then drop your 2 files back in and git add and git commit
6. then update your copy on github with git push --force origin master (assuming you've set up 'origin' to match your github.com/TAC/Ahk2exe
7. then your PR #59 should automatically update with only your new single commit


Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 80 guests