Chimaera Posted October 9, 2011 Posted October 9, 2011 ok np i saw there was an Obfustcator beta atm. Thanks anyway ill wait till autoit stops being beta and it will be solved, and ill use the comment for now Many thanks If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()
PieceOfIce Posted October 30, 2011 Posted October 30, 2011 (edited) My Input: MsgBox(0, "", "lol""lol") Global Enum Step -2 $e1var1, $e1var2 = 13, $e1var3 What I get: global $A0D00103156=A5C00001342($Os[0x1]),$A2900202B1E=A5C00001342($Os[0x2]),$A4D00303A03=A5C00001342($Os[0x3]),$A5B00604555=A5C00001342($Os[0x4]) MsgBox(Number($A0D00103156), "", $A2900202B1E) Global Enum Step -Number($A4D00303A03) $A3C00400532, $A0D00506036 = Number($A5B00604555), $A5400703D09 With .au3.tbl being the following: 203020[BAA43t6C6F6C22226C6F6C[BAA43t203220[BAA43t20313320[BAA43t Which is equal to: 0 lol""lol 2 13 Note: 1. Numbers have a leading and trailing space 2. The string still has the double quote escaped (two times) although it won't get processed 3. The enum's stepvalue got replaced which is erroneous and should have already been fixed according to the changelog Is it normal like this or am I doing something wrong? I used the newest version available (1.0.29) by clicking it twice and selecting my file.. Edited October 30, 2011 by PieceOfIce
Developers Jos Posted October 30, 2011 Author Developers Posted October 30, 2011 How did you get to the "Which is equal to:" results as the posted script doesn't produce that? When I run this line in both original and obfuscated versions it produces the same result without any extra spaces: MsgBox(0, "", "lol""lol") MsgBox(0, "", "!" & 1 & "!") 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.
PieceOfIce Posted October 30, 2011 Posted October 30, 2011 out of the .tbl-file, just used some javascript to convert it back to ascii e.g. the first entry is "203020" which is " 0 ", strangely padded with spaces there is only one zero in the script means it's from "MsgBox(0,..." but there actually weren't any spaces therefore I wonder why it's padded, additionally they aren't of any need there, so they just waste some bytes ("203020" vs "30").. When I run this line in both original and obfuscated versions it produces the same result without any extra spaces:I don't quite understand.. I did it like this: 1. I saved my script which is like I wrote above in some .au3-file 2. I downloaded your obfuscator.zip 3. I executed it and selected my .au3-file 4. I compiled the outcoming Sample_Obfuscated.au3 with Aut2Exe And when executing Sample_Obfuscated.exe I receive the following MessageBox: --------------------------- --------------------------- lol""lol (instead of >lol"lol<) and afterwards this error: --------------------------- AutoIt Error --------------------------- Line 5 (File "C:\AutoIt\Sources\Obfuscator Test\Sample_Obfuscated.exe"): Error: Badly formated Enum statement
Developers Jos Posted October 30, 2011 Author Developers Posted October 30, 2011 Try using the latest available Beta version of Obfuscator v 1.0.29.3 which contains a fix for the double quote issue. 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.
KaFu Posted November 12, 2011 Posted November 12, 2011 Hi Jos, thanks again for this great tool, can't say it often enough . But of course this is not the only reason why I post ... I'm obfuscating my tool SMF with the following switches: "/sf /sv /om /cs=0 /cn=0". I do this to speed up the overall script execution (just done a replace of all $ and had some 48.000 hits in my script). Looking at the obfuscated script itself I've noticed the following: Variables always start with an "a" and have at least 3 characters => $aXX Functions are always at least 4 characters long, underscore "_" being the first and the last one => _XX_ Would it be possible to implement an iteration through all valid characters for variables and functions? This would shorten up my script by a good and measurable amount. E.g. when $az is reached start over with $b1? I did an iteration once myself. I've found no restrictions to rename a var to anything of the 37 elements long array, and the restrictions I've found for functions could be avoided with something like this ("pseudocode"): Global $_BCaddlNums[37] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "_", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"] Dim $aFuncs_Skip[24]=["do", "in","if","or","to","abs","and","asc","chr","cos","dec","dim","exp","for","hex","int","log","mod","not","opt","ptr","run","sin","tan"] $sFuncsNew = _BasetoBase($i + $var_offset, 10, 37) If Asc(StringLeft($sFuncsNew,1)) < 58 Or _StringInArray($sFuncsNew, $aFuncs_Skip) Then ; numbers are no good as first letter for functions ContinueLoop EndIf Would be great if you could take a look into this how hard it would be to further optimize the /om switch ... Best Regards OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
iCode Posted December 1, 2011 Posted December 1, 2011 i'm using Yashied's HotKey 2.0b function which i really like, but i'm having problems when obfuscating my script (switches don't seem to matter)... -### StripOnly/StripFunc Error: Found Call() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by the Call() statement. >### current Func: HK_WM_HOTKEY ok, fine, so then i add... #Obfuscator_Ignore_Funcs=HK_WM_HOTKEY and i get the same warning as above, which, from what i've read here, is to be expected apparently, but my script is still broken (the hot-keys i set with _HotKey_Assign() don't work) i also tried adding "_HotKey_Assign" and "_GUICtrlHKI_GetHotKey" as well as my entire function from which the hot-keys are set (a configuration UI) and the results are the same in that the hot-keys never work all works fine without obfuscating, but i'd like to chop the output size ( i usually use /sf /sv /om /cs=0 /cn=0) this is with Obfuscator 1.0.29.0 and i tried both with and without the /beta switch FUNCTIONS: WinDock (dock window to screen edge) | EditCtrl_ToggleLineWrap (line/word wrap for AU3 edit control) | SendEX (yet another alternative to Send( ) ) | Spell Checker (Hunspell wrapper) | SentenceCase (capitalize first letter of sentences) CODE SNIPPITS: Dynamic tab width (set tab control width according to window width)
BrewManNH Posted December 1, 2011 Posted December 1, 2011 You could make a dummy call to that function at the start of the script. Just add HK_WM_HOTKEY() somewhere in the script and you won't have to worry about it being stripped. As long as this function returns immediately and you're not affecting anything by calling it randomly in the script, it should get rid of the issue. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
iCode Posted December 1, 2011 Posted December 1, 2011 i don't understand why #Obfuscator_Ignore_Funcs=HK_WM_HOTKEY is not working though the only "Call()'s" are in the "HK_WM_HOTKEY" func FUNCTIONS: WinDock (dock window to screen edge) | EditCtrl_ToggleLineWrap (line/word wrap for AU3 edit control) | SendEX (yet another alternative to Send( ) ) | Spell Checker (Hunspell wrapper) | SentenceCase (capitalize first letter of sentences) CODE SNIPPITS: Dynamic tab width (set tab control width according to window width)
KaFu Posted December 1, 2011 Posted December 1, 2011 (edited) The problem is not where it's called, but what it calls... it calls $hkTb[$lParam][1], which is set in the function _HotKey_Assign() to $hkTb[$Index][1] = $sFunction... which is exactly the string I've already mentioned in the HotKey UDF post... e.g.:_HotKey_Assign(BitOR($CK_CONTROL, $VK_ESCAPE), 'Quit') => #Obfuscator_Ignore_Funcs=Quit Edited December 1, 2011 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
iCode Posted December 1, 2011 Posted December 1, 2011 ok, now i got it working properly. i was ignoring the wrong funcs. thanks again KaFu btw, i moved this here because i realized this an obfuscator issue and not a HotKey issue FUNCTIONS: WinDock (dock window to screen edge) | EditCtrl_ToggleLineWrap (line/word wrap for AU3 edit control) | SendEX (yet another alternative to Send( ) ) | Spell Checker (Hunspell wrapper) | SentenceCase (capitalize first letter of sentences) CODE SNIPPITS: Dynamic tab width (set tab control width according to window width)
KaFu Posted December 2, 2011 Posted December 2, 2011 Good to hear ... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
Developers Jos Posted December 2, 2011 Author Developers Posted December 2, 2011 Hi Jos,thanks again for this great tool, can't say it often enough .But of course this is not the only reason why I post ...I'm obfuscating my tool SMF with the following switches: "/sf /sv /om /cs=0 /cn=0". I do this to speed up the overall script execution (just done a replace of all $ and had some 48.000 hits in my script). Looking at the obfuscated script itself I've noticed the following:Variables always start with an "a" and have at least 3 characters => $aXXFunctions are always at least 4 characters long, underscore "_" being the first and the last one => _XX_Would it be possible to implement an iteration through all valid characters for variables and functions? This would shorten up my script by a good and measurable amount. E.g. when $az is reached start over with $b1?Is there really so much gained by also changing the Func names?Variables I can imagine the gain can be substantial having seen your project and I can have a look at that.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.
KaFu Posted December 2, 2011 Posted December 2, 2011 (edited) Is there really so much gained by also changing the Func names?Variables I can imagine the gain can be substantial having seen your project and I can have a look at that.Just did an obfuscation of my latest dev version ("/sf /sv /om /cs=0 /cn=0") and found 1.074 functions in the obfuscator.log to be replaced. It's quite hard to count all occurrences, but I assume them to be at least some 10.000. So the number is lower than for variables (not really surprising ), on the other hand vars in /om have a minimum length of 3, funcs of 4, so more potential there . Like you mentioned the total gain in size reduction and speed improvement is relative to the overall size of the project. Glad you took the request ... Edited December 2, 2011 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
Developers Jos Posted December 4, 2011 Author Developers Posted December 4, 2011 (edited) Have a go with the current Beta v1.0.29.4 It will create shorter Var and Func names and sequences them individually. v1.0.29.4: - Fixed issues with relative includes using .. in the filename. - Changed the /OM variable length Edited December 5, 2011 by Jos KaFu 1 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.
KaFu Posted December 4, 2011 Posted December 4, 2011 Nice , that reduced SMF's obfuscated source from 1.370 to 1.306KB (~5%). I'll test it and let you know if I find any bugs... Thanks a lot for taking this request Jos! Best Regards OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
guinness Posted December 5, 2011 Posted December 5, 2011 Same as well, I've seen a nice 5% decrease in filesize. Thanks Jos. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
Moderators Melba23 Posted December 5, 2011 Moderators Posted December 5, 2011 Jos, Same 5% decrease here and no problems encountered so far. Dank je wel. 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
archrival Posted December 6, 2011 Posted December 6, 2011 (edited) Edit:The new obfuscator is crashing when the previous beta (1.0.29.3) does not.#Obfuscator_Parameters=/sf=1 /sv=1 /om /cs=0 /cn=0 /cf=1 /cv=1Faulting application name: Obfuscator.exe, version: 1.0.29.4, time stamp: 0x4edbe7a4Faulting module name: Obfuscator.exe, version: 1.0.29.4, time stamp: 0x4edbe7a4Exception code: 0xc00000fdFault offset: 0x0000f227Faulting process id: 0x1358Faulting application start time: 0x01ccb431f36e0059Faulting application path: C:Program Files (x86)AutoIt3SciTEObfuscatorObfuscator.exeFaulting module path: C:Program Files (x86)AutoIt3SciTEObfuscatorObfuscator.exeReport Id: 3208236f-2025-11e1-9b66-005056c00008 Edited December 6, 2011 by archrival
Developers Jos Posted December 6, 2011 Author Developers Posted December 6, 2011 Edit:The new obfuscator is crashing when the previous beta (1.0.29.3) does not.#Obfuscator_Parameters=/sf=1 /sv=1 /om /cs=0 /cn=0 /cf=1 /cv=1could be, but i really need a script to replicate this unless you are telling me it always crashes. 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.
Recommended Posts