Jump to content

[REQ] Smaller AutoIt Executables


Recommended Posts

  • Replies 46
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Developers

will I be offended too, if I ask for your final statement about the topic?

Just curious: What is the general idea other then NO you get when ready this and the many other threads on this subject?

I'm not interested in keylogger, simply love AutoIt, ...

The Keylogger issue is only directed to the OP and he knows why.

... but don't like the bloatware it will become. ;)

Don't use it when this is how you feel about it, but better not use any modern software either as they all fit your definition of bloatware.

...and? did you get offended by this?

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I love AutoIt3 and the A3x format, people who bitch about size should really consider this for a moment....

You only ever need 1 Interpreter (500kb unpacked / 300kb packed) to breed an entire army of additional utils if you use the A3x format smartly. (this is an incredibly versatile idea of the developers)

But why create a shell extension to the A3x format when you could take advantage of AutoIt3's ability to find the A3x binary within any other type of file! Such as a batch file, (yeah laugh it up) try the following as a feeble example...

Create a batch file in your Au3 install directory:

START AutoIt3.exe %0%
EXIT /B

Create a simple Au3 script and create an A3x from it with Aut2Exe, also in the install directory.

Now concatenate the bat and the A3x together, by whatever means you use, I will use the cmd shell.

COPY /B Autoa3x.bat+YourScript.a3x AutoexScript.bat

And double click this new batch variant, it should call the main interpreter upon itself and thus execute the A3x section at the tail of the batch file.

Lame true but it works, and can be more effective if the interpreter (or Your Au3 program) were easily accessible to the system by the PATH environment variable ... etc.

Why stop at batch files? why not write your own little self executable pe headers that when concatenated with an A3x do the same as a batch file and simply call the interpreter on itself and execute the attached A3x data?

Doing it with a pe header (exe/dll) would allow your a3x script to reference any icons or other resource data within itself with a simple @SCRIPTNAME macro in most functions.

Looking at it this way, a small core interpreter which itself could also be an A3x program, feeding loads of other little applets that use the above mentioned method is not really a large price to pay, so stop fucking bitching about size all of y'all.

Vlad

Edited by Mobius

wtfpl-badge-1.png

Link to comment
Share on other sites

Just curious: What is the general idea other then NO you get when ready this and the many other threads on this subject?

Just hoping that NO not always means absolutely NO.

...and? did you get offended by this?

Also No, I get a clear answer to my question, thanks.
Link to comment
Share on other sites

Why stop at batch files? why not write your own little self executable pe headers that when concatenated with an A3x do the same as a batch file and simply call the interpreter on itself and execute the attached A3x data?

Doing it with a pe header (exe/dll) would allow your a3x script to reference any icons or other resource data within itself with a simple @SCRIPTNAME macro in most functions.

Interesting idea.

Anyway for those which require smaller compiled EXE size I recommend to use another language with compiler to machine code (without interpreter & bytecode).

There are plenty of such free languages based on Basic,Pascal,C,C++.

Just use google for "free compiler" or something similar to see.

Link to comment
Share on other sites

Interesting idea.

Anyway for those which require smaller compiled EXE size I recommend to use another language with compiler to machine code (without interpreter & bytecode).

There are plenty of such free languages based on Basic,Pascal,C,C++.

Just use google for "free compiler" or something similar to see.

Glad you like it Zedna :evil:, I use such miniature A3sfx stubs myself for my own environment. They can be as simple or as complex as required.

I even have full programs written in other languages that actually have an A3x binary either embedded or concatenated to add additional functionality to said program that I cannot yet achieve in that language. (or can achieve quicker with AutoIt3)

Plus you cannot beat everything in a single file really can you :evil:

Really pains me to see people bitch about something so versatile as Au3. ;)

Edited by Mobius

wtfpl-badge-1.png

Link to comment
Share on other sites

  • Moderators

Mobius,

What an amazing way to use .a3X files. Thank you very much for sharing it. ;)

I never cease to be amazed at what you can do with AutoIt. :evil:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Well what do you know.... someone actually found this info useful :evil::idea:

Thanks Melba23

ED: All thanks to the developers that made this ever surprising tool. :evil:

As an afterthought here is a crappy simple example of such a stub written in c, it should compile with bloodshed Dev++ OOTB.

Compile, concatenate output exe with an A3x file, put the output file in the same folder as AutoIt3.exe and run the Hybrid. ;)

/*  C A3XPE-CORE STUB by MOBIUS SaturDay 11/10/2008 PM 04:20:12
    UPDATED MonDay 13/10/2008 AM 03:34:05
    VERSION 0.0.0.4
    * Embeds a simple known Anti-Decompilation Exploit *
    * Uses Reversed Internal Cmd String Method *
    * Can Pass Cmdline to binary *
    * Can Pass Environment vars to binary *
    - Contains processwait ability code, just uncomment it! -
    PURPOSE ::
    To act as a stub for embedding a3x binary scripts.
    Stub calls whatever interpreter name you specify and
    calls the interpreter on itself, thus executing the
    embedded a3x binary!
        
    Think about it...an A3X with a resource table...well sort of. <img src='http://www.autoitscript.com/forum/public/style_emoticons/<#EMO_DIR#>/wink.png' class='bbc_emoticon' alt=';)' />
*/
#include <windows.h>
#include <string.h>
#include <stdlib.h>
//#define EXPLOIT "ÿm°Î" //Use if exploit (old fake FILE token) is not used elswhere #1
#define REVEXEC " exe.3TIOTUA"  //Reversed exe string, something I do...
#define ENVSEND "ÿm°Î=0:0:0:4"
STARTUPINFO si={sizeof(si)};
PROCESS_INFORMATION pi;
int main(int argc, char *argv[])
{
    //char* lol = EXPLOIT;  //Use if exploit is not used elswhere #2
    static char a[255] = REVEXEC;
    char* exename;
    if(strstr(strlwr(argv[0]),".exe")){
    exename = argv[0];
    }else{
    exename = strcat(argv[0],".exe");
    }
    char* b=strcat(strrev(a),exename);
    int c=1;
    if(argc > c){
        while(argv[c] != NULL){
            b=strcat(b," ");
            b=strcat(b,argv[c]);
            ++c;
        }
    }
    putenv(ENVSEND);
    if(!CreateProcess(0,a,0,0,FALSE,0,0,0,&si,&pi)){
        MessageBox(0,b,"Error",MB_TOPMOST);
        exit(1);
    }
    //WaitForSingleObject(pi.hProcess,INFINITE);    //For ProcessWait
    CloseHandle(pi.hProcess);
    CloseHandle(pi.hThread);
    exit(0);
}
This is old code so pls don't LoL too hard eh. :)

Respect

Vlad

Edited by Mobius

wtfpl-badge-1.png

Link to comment
Share on other sites

It's really a non-issue anyway. A compiled empty script is around 300 kb. Add over 24000 lines of code and it only goes up to 749 kb. That is a small executable these days.

This has been hammered around far too many times already. If you want smaller executables then write your own compiler or write all your apps in C++.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

The file size for AutoIt scripts is great!, it just depends on what the product is. And about the "keylogger", why code a keylogger when you can code a Runtime crypter in AutoIt? Not premoting this in any way but i have a friend who has actually managed to make a RAT (Remote Administration Tool) in AutoIt aswell as a Runtime Crypter which can basicly load any file including malware in the memory leaving AV's useless. Im not the one who is abusing this language as much as some people i know do. The true fact is that this friend of mine is actually making loads of money of this product! yes soon many false detections will appear. This might not happen in second thoughts because he has completely encrypted the code. If i was to ever code something such as this, i would not sell it. Only keep it to myself. That was just a little heads up of whats going on. Nice script btw. Jos please dont see every post as a threat to the language. Who knows i might even end up working for yous to help stop this type of development. Peace.

Edited by anzacfalcon
Link to comment
Share on other sites

  • Developers

The file size for AutoIt scripts is great!, it just depends on what the product is. And about the "keylogger", why code a keylogger when you can code a Runtime crypter in AutoIt? Not premoting this in any way but i have a friend who has actually managed to make a RAT (Remote Administration Tool) in AutoIt aswell as a Runtime Crypter which can basicly load any file including malware in the memory leaving AV's useless. Im not the one who is abusing this language as much as some people i know do. The true fact is that this friend of mine is actually making loads of money of this product! yes soon many false detections will appear. This might not happen in second thoughts because he has completely encrypted the code. If i was to ever code something such as this, i would not sell it. Only keep it to myself. That was just a little heads up of whats going on. Nice script btw. Jos please dont see every post as a threat to the language. Who knows i might even end up working for yous to help stop this type of development. Peace.

Totally lost what you exactly trying to say here, but let me do the honors of refreshing your memory: http://www.autoitscript.com/forum/index.php?showtopic=102490

This was the only reason for my remark, but its good to read that my suspicion is correct that you are still abusing the language

Im not the one who is abusing this language as much as some people i know do.

Peace back.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • 1 month later...

Well what do you know.... someone actually found this info useful :D;)

Thanks Melba23

ED: All thanks to the developers that made this ever surprising tool. :D

As an afterthought here is a crappy simple example of such a stub written in c, it should compile with bloodshed Dev++ OOTB.

Compile, concatenate output exe with an A3x file, put the output file in the same folder as AutoIt3.exe and run the Hybrid. :D

/*  C A3XPE-CORE STUB by MOBIUS SaturDay 11/10/2008 PM 04:20:12
    UPDATED MonDay 13/10/2008 AM 03:34:05
    VERSION 0.0.0.4
    * Embeds a simple known Anti-Decompilation Exploit *
    * Uses Reversed Internal Cmd String Method *
    * Can Pass Cmdline to binary *
    * Can Pass Environment vars to binary *
    - Contains processwait ability code, just uncomment it! -
    PURPOSE ::
    To act as a stub for embedding a3x binary scripts.
    Stub calls whatever interpreter name you specify and
    calls the interpreter on itself, thus executing the
    embedded a3x binary!
        
    Think about it...an A3X with a resource table...well sort of. <img src='http://www.autoitscript.com/forum/public/style_emoticons/<#EMO_DIR#>/wink.png' class='bbc_emoticon' alt=';)' />
*/
#include <windows.h>
#include <string.h>
#include <stdlib.h>
//#define EXPLOIT "ÿm°Î" //Use if exploit (old fake FILE token) is not used elswhere #1
#define REVEXEC " exe.3TIOTUA"  //Reversed exe string, something I do...
#define ENVSEND "ÿm°Î=0:0:0:4"
STARTUPINFO si={sizeof(si)};
PROCESS_INFORMATION pi;
int main(int argc, char *argv[])
{
    //char* lol = EXPLOIT;  //Use if exploit is not used elswhere #2
    static char a[255] = REVEXEC;
    char* exename;
    if(strstr(strlwr(argv[0]),".exe")){
    exename = argv[0];
    }else{
    exename = strcat(argv[0],".exe");
    }
    char* b=strcat(strrev(a),exename);
    int c=1;
    if(argc > c){
        while(argv[c] != NULL){
            b=strcat(b," ");
            b=strcat(b,argv[c]);
            ++c;
        }
    }
    putenv(ENVSEND);
    if(!CreateProcess(0,a,0,0,FALSE,0,0,0,&si,&pi)){
        MessageBox(0,b,"Error",MB_TOPMOST);
        exit(1);
    }
    //WaitForSingleObject(pi.hProcess,INFINITE);    //For ProcessWait
    CloseHandle(pi.hProcess);
    CloseHandle(pi.hThread);
    exit(0);
}
This is old code so pls don't LoL too hard eh. ;)

Respect

Vlad

Hi Mobius,

Could please post this example in vbscript too coz Im not familiar with C, I'll stick with vbscript instead? :D:)

Thanks.

BTW, the batch file example is pretty amazing, I didnt know we could use a3x like that. :huggles::P

OT : Any chances of porting the wrapper to autoit? :

It is a very good tool.Hehe.

Edited by MyDream
Link to comment
Share on other sites

Hi Mobius,

Could please post this example in vbscript too coz Im not familiar with C, I'll stick with vbscript instead? ::D

Thanks.

You want the above C wrapper converted into VBScript *shudders*

There are a number of reasons why it won't work with a vbscript, primary of those is its lack of multi-line comments, The vbs parser would never get passed the A3x data . You could do it with a jscript though.

Or do you mean Visual basic??

BTW, the batch file example is pretty amazing, I didnt know we could use a3x like that. :D :D

:) Not even the half of it dude, experiment a little.

OT : Any chances of porting the wrapper to autoit? :huggles:

It is a very good tool.Hehe.

Ed:

*snip*

Oh you were talking about this wrapper from here, they would never let me release the Au3 version even if it were finished.

And you were talking about vbscripts when compiled to an executable in your pm, the answer would be yes in some cases.

Edited by Mobius

wtfpl-badge-1.png

Link to comment
Share on other sites

You want the above C wrapper converted into VBScript *shudders*

There are a number of reasons why it won't work with a vbscript, primary of those is its lack of multi-line comments, The vbs parser would never get passed the A3x data . You could do it with a jscript though.

Or do you mean Visual basic??

:huggles: Not even the half of it dude, experiment a little.

Ed:

*snip*

Oh you were talking about this wrapper from here, they would never let me release the Au3 version even if it were finished.

And you were talking about vbscripts when compiled to an executable in your pm, the answer would be yes in some cases.

In that case, yes I want examples of vbscript, visualbasic, emergence basic and javascript if those could be then done(Yeah, Im greedy on examples :D ). Thanks alot. :

Link to comment
Share on other sites

In that case, yes I want examples of vbscript, visualbasic, emergence basic and javascript if those could be then done(Yeah, Im greedy on examples :D ). Thanks alot. :D

No dude you are just plain greedy :huggles::

Here are a couple of simple source examples and thier compiled output and an Example.

Enclosed are:

  • A3XPE_BCX.bas , A3XPE_BCX.exe (BCX basic to c converter)
  • A3XPE_FB.bas , A3XPE_FB.exe (FreeBasic)
  • A3XPE_PB.pb , A3XPE_PB.exe , Example.exe (PureBasic4)
  • A3XPE_C.c , A3XPE_C.exe (Previously posted c code)
Not what you asked for, I will leave those to you.

Vlad

wtfpl-badge-1.png

Link to comment
Share on other sites

  • 2 months later...

Thanks Mobius, this is very interesting!

One question, how do you add icon resources to your exe_stub+a3x?

Maybe I haven´t underestood it ok, I do this:

I compile to a3x format -> myscript.a3x

(Do I assign the icons at this stage with AutoIt3Wrapper?)

I join with your stub:

copy /b A3XPE_C.exe+myscript.a3x myscript.exe

And with AutoIt3.exe in the PATH or same folder it should run, isn't it?

I get an error: Missing separator character after keyword.

I'm probably doing something the wrong way...

And how do you set icons and other information you can put with AutoIt3Wrapper (exe version, for instance).

Thanks!

Edited by Ximorro
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...