Let me clarify my intent isn't encryption,obfuscation or anything in that regard, i'm simply trying to embed A default script in the interpreter. By default script i mean how if <ahk>.exe is run, <ahk>.ahk is loaded from working directory or my documents. I've seen one or two posts inquiring about this,but there was no definitive response, and i figure i'd try to make a better case as to why this is a valid & even great idea.
I'm not asking for lexikos to make this a feature or anything, i'm more asking for directions as to how i might approach this, it's easy enough to set a script as a variable in the source, but i can't quiet figure out how to get the interpreter to load the variable afterwards, i've so far tried & failed at reloading the script with the variable piped in(couldn't pipe it properly) & tried using the script-variable where a script is expected to be piped in(broke the source with every approach).
I'm certain both approaches only failed due to my current limitations with cpp,i'm solid with c though,for reference.
I know this will stir up some suspicion as to my motives & such, so here's a fine revision of my motives & how i see this being useful,in the broader scheme of things.
Why?
- +A default script embeded where other scripts can be run as well, i know ahk_h offers something of the kind, it'd be nice in ahk_l is all.
- +Allows Integrating Compatibility Patches & StdLib's written in Ahk as though they were a part of the interpreter.
- ++Allows extending Ahk with code written in Ahk, where performance isn't an issue.
- I think a lot of primitive features such as function wrappers for legacy commands aren't integrated into ahk v1 because it isn't worth the time,and is available for use in stdlib, i think this is a fine illustration of a patch easily doable with an embedded append to executed scripts,i think not every feature ought to be implemented in cpp, it's simply a time sink & a burden.
++Allows simpler prototyping of (experimental)features,do it as a patch & depending on feedback & time, rewrite in cpp.
- ++Allows extending Ahk with code written in Ahk, where performance isn't an issue.
- +Script can still be retrieved by string dump of the process, so it doesn't defy the current ethos of ahk_l,it doesn't offer false or any protection for that matter...
- +Makes Ahk more powerful & extensible...
- +Provides yet another way to compile your scripts...
- -Guaranteed Malicious Misuse
- ++Although, the official Ahk binary won't be flagged as the culprit-by all but the AV engines.
++The Import table will still identify it as malicious, as Ahk's rather 'dangerous' import table will be flagged when contained by any executable that isn't a widely distributed binary with a known hash.
++Any half good AV will flag a compressed exe if indeed compresssed & unpack it even, therefore there's really no simple way to conceal the capabilities of the binary.
- ++Although, the official Ahk binary won't be flagged as the culprit-by all but the AV engines.