4Eyes Posted August 17, 2011 Share Posted August 17, 2011 folks, Can somebody please tell me what the compiler option 'FileInclude Compression' actually does beside make the code size smaller? What does it do to the exe file for the different settings of Lowest to Highest? Thanks, 4Eyes Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 17, 2011 Moderators Share Posted August 17, 2011 4Eyes,Although not privy to the internal working of Aut2Exe, I understand the option to work this way. Using FileInstall includes the code of the required files within the compiled AutoIt executable. This setting determines the compression applied to the included code - basically a tradeoff between final size of the executable and the speed of extracting the file when installing it.I seem to recall that in earlier versions of AutoIt this option referred to overall compression of the FileInstalled and script code - it is only when I looked just now that I saw it was labelled only "FileInstall Compression". The algorithm used is one devised by Jon ("Hardest thing I've written was the compression code used in Aut2Exe that I wrote from scratch").Standing by to be corrected by Jon. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
4Eyes Posted August 18, 2011 Author Share Posted August 18, 2011 Melba23, Thanks for your reply. I was looking for a way to make the source code included in a compiled exe harder to read (of course obfuscated), should someone decide to do some hacking. I did some testing on this before posting with a simple 1 liner that pops a MsgBox. No includes and no FileInstalls. The resultant exe file does change size marginally when varying the 'FileInclude Compression' option, though. So, it makes me wonder what is going on. Regards, 4Eyes Link to comment Share on other sites More sharing options...
JohnOne Posted August 18, 2011 Share Posted August 18, 2011 I think when you obfuscate a script, it adds a file to it, so its possible that's the file being compressed. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 18, 2011 Moderators Share Posted August 18, 2011 4Eyes,a way to make the source code included in a compiled exe harder to read (of course obfuscated), should someone decide to do some hackingSearching the forums will provide you with a lot more information in greater detail, but in brief:- Your plain language script is within the compiled .exe, but in compressed form. It is not immediately viewable with a hex editor, but is by no means secure as it is expanded in memory when the .exe is run.- Obfuscator (part of the full SciTE4AutoIt3 package) will obscure your script by changing variable and constant names (and a lot more!), which makes it harder to decompile but again does not render the .exe secure.So, compiling an AutoIt script will prevent quick snooping, but a determined, experienced hacker can relatively easily get your source - including passwords, specific filenames, etc - or the encryption routines you have used in your script to encrypt/decrypt them if they are stored in another file. JohnOne,Obfuscation does not add anything to your script. It produces a new source file My_Script_Obfuscated.au3 based on the directives you use. It is this file which is passed to Aut2Exe for compilation. Of interest, it is this file which can help you with the dreaded "Error on Line ###" problem when running compiled files as all comments and blank lines are removed and all includes included - so the line number is valid within this file. Both of you,If you choose your Obfuscator directives to remove all unused constants and function from the include files (/StripOnly or /so) and/or to replace all variable and constant names with random 3-character trigraphs (/ObfuscateMinimum or /om) you can reduce the size of the executable file considerably. Bear in mind that if you want both of those options you need to spell it out fully (/sf /sv /om /cs=0 /cn=0) as Obfuscator looks no further than /so if that is included. I hope that helps. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JohnOne Posted August 18, 2011 Share Posted August 18, 2011 I once used something like resource hacker on an obfuscated compiled script, and it extracted some .tbl (or similar) file from it, so thats what I thought might cause the difference in size when the OP uses compression. Saying that, I might have been looking at something totally different, it was over a year ago As always, thanks for your tips M23 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 18, 2011 Moderators Share Posted August 18, 2011 JohnOne,I have been doing a little research and you are quite right - Obfuscator will FileInstall a .tbl file to the Temp folder if you set the encryption parameters. It is needed to decrypt the script when run. As I never set those parameters I have never seen it in any of my scripts. Thanks for pushing me into a better understanding of Jos' excellent utility. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
4Eyes Posted August 19, 2011 Author Share Posted August 19, 2011 Thanks guys. Knew most of what you wrote Melba23 but thanks again. Also knew about tbl file as I've been looking hard at this stuff. Not that it makes a huge amount of difference but on my test script: - highest compression made a 1.27MB exe and took 81.7 seconds (on a flash drive) - normal made a 1.33MB exe and took 87 seconds - lowest made a 1.61MB exe and took 97 seconds It's really quite bizarre to see that higher compression is faster. Scratching head.... Maybe that effort that Jon put into the compression really paid off. Regards to you both. 4Eyes Link to comment Share on other sites More sharing options...
SecretLanguage Posted November 25, 2012 Share Posted November 25, 2012 Does this mean there is only one compiler setting or are there additional Link to comment Share on other sites More sharing options...
Developers Jos Posted November 25, 2012 Developers Share Posted November 25, 2012 Dog ate your helpfile? Look at the Index: AutoIt/Using AutoIt/Compiling Scripts 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now