GameIDevelp Posted June 28, 2009 Share Posted June 28, 2009 (edited) the right way is to obfuscate the code and next think is to compile normali right .? For my first problem ,, a guy from this forum ( i dont now if a can put there username) she tell me the problem is #include files ,,,, ,,, i resolve that problem , now I can obfuscate the code ,, but when I execute te exe file I have a Global$ Error ..(see img) , where is my mistake ? Edited June 28, 2009 by GameIDevelp Link to comment Share on other sites More sharing options...
Developers Jos Posted June 28, 2009 Author Developers Share Posted June 28, 2009 (edited) the right way is to obfuscate the code and next think is to compile normali right .? For my first problem ,, a guy from this forum ( i dont now if a can put there username) she tell me the problem is #include files ,,,, ,,, i resolve that problem , now I can obfuscate the code ,, but when I execute te exe file I have a Global$ Error ..(see img) , where is my mistake ? Please stop posting in this thread about generic syntax problems.As I mentioned: Obfuscation will only work on clean/proper code.Jos Edited June 28, 2009 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 More sharing options...
GameIDevelp Posted June 28, 2009 Share Posted June 28, 2009 sorry for problem that i make .... Where to ask about obfuscator problem .? I will not post on this page again . You not read my first post on this page where is code " in the code not exist any errors" because is an exemple of library autoit . Link to comment Share on other sites More sharing options...
Developers Jos Posted June 29, 2009 Author Developers Share Posted June 29, 2009 (edited) sorry for problem that i make .... Where to ask about obfuscator problem .?I will not post on this page again .You not read my first post on this page where is code " in the code not exist any errors" because is an exemple of library autoit .When you have a clean running script via AutoIt3 and the Obfusctated exe doesn't work then send/pm me the following info in a zip file and I will have a look:- original source and all none standard include files.- Obfuscator.log from the Obfuscator program directory.- output script.exeJos Edited June 29, 2009 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 More sharing options...
Developers Jos Posted June 29, 2009 Author Developers Share Posted June 29, 2009 The PMed obfuscated source works fine for me using AutoIt3 v3.3.You are using V3.2.2 which is missing the Function BinaryToString() :20th May, 2007 - v3.2.4.5Added: BinaryToString() for binary buffer to ANSI string quick conversions. 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...
Spiff59 Posted June 30, 2009 Share Posted June 30, 2009 (edited) Is this a known issue (or non-issue) with the /so option of Obfuscator? The example below runs fine from Scite or when compiled without "/so". With "/so", the user-defined function Input_Form1() is dropped. #Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/so #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** $Current_Form = "1" Call("Input_Form" & $Current_Form) Exit Func Input_Form1() MsgBox(1,"","I'm not going to be included in the compile") EndFunc Edit: I just found reference to a "GUICtrlSetOnEvent(-1, $Func[$i])" statement in this loooong thread. It looks like that is a similar question. I guess I'd best wrap the portion I want to protect in an "#obfucator=off/#obfuscator=on" block? Edited June 30, 2009 by Spiff59 Link to comment Share on other sites More sharing options...
KaFu Posted June 30, 2009 Share Posted June 30, 2009 (edited) Known 'issue'#660934Obfuscator can handle Functions that use a UDF name in its parameters as long as this parameter is a literal string.It will never ever work when it contains variables as it will not be able to determine its value at run time.So I assume your Func is identified as not used and thus stripped. Edited June 30, 2009 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) Link to comment Share on other sites More sharing options...
Ascend4nt Posted June 30, 2009 Share Posted June 30, 2009 (edited) Spiff59, as long as a function isn't directly called, and is either in a variable or in a string, Obfuscator doesn't recognize it as being 'in use'. The following directive helps obfuscation, but *NOT* for strip-only obfuscation (which I wish they'd change the operation on: #Obfuscator_Ignore_Funcs=Input_Form1 ; (above does NOT work correctly for strip-only) Spiff59, what I do to fix the problem is to directly call the function. Either call it after an 'Exit' or 'Return' statement inside another function. For example: Func Obfuscator_ForceNoStrip() Return Input_Form1() ; doesn't actually get called here, as it occurs after the Return ;However, as long as Obfuscator_ForceNoStrip() is called, this line forces Input_Form1 to not be stripped EndFunc Add this line to your main code, and you won't have the function stripped: Obfuscator_ForceNoStrip() *edit: sorry, I called you spiffy not spiff59 my bad! Edited June 30, 2009 by ascendant My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs |Â Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) |Â Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
KaFu Posted June 30, 2009 Share Posted June 30, 2009 Smart trick, memorized . Â 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) Link to comment Share on other sites More sharing options...
skyteddy Posted July 1, 2009 Share Posted July 1, 2009 Hello, since many monthes I use the obfuscator with all my scripts without any problem. Now I added many new functions to one of my scripts. The AU3Check works without errors. If I compile the large script with using the obfuscator, the obfuscator crashes at the end of his work, but it seams, the obfuscator has done his job. The AU3Check for obfuscated file runs without errors, also the aut2exe.exe. Crashes means, I got a windows with from XP: "Obfuscator has detect a problem... [close] [send to M$]" [sorry, free translation ] Here an extract of the obfuscator.log 0.00 AutoIt3 Source Obfuscator v1.0.26.13 Copyright © Jos van der Zande May 27, 2009 0.00 CommandLine Params$: 0.00 ============================== Reading Source For Directive ====================================================== 0.36 Ignore Function: onautoitstart 0.36 Ignore Function: onautoitexit 0.36 Directive Params$:/cs=1 /cn=1 /cf=1 /cv=1 /sf=1 /sv=1 ... ... 119.58 =================================================================================================== +> Source 47380 lines 2260239 Characters. +> Stripped 10946 Func/Var lines and 27719 comment lines, Total 1916730 Characters. +> Saved 81% lines 84% Characters. +> Obfuscator v1.0.26.13 finished obfuscating 9327 lines, created:H:\projects\\ruKernelTool\ruKernelTool_V0.1.0.4_Obfuscated.au3 119.64 ############################## Done ##################################################################### I tried to compile this script on a second PC with the same result. I reinstalled autoit and scite completely, nothing helps. What can I do? Many thanks in advance R@iner Link to comment Share on other sites More sharing options...
Spiff59 Posted July 1, 2009 Share Posted July 1, 2009 I was cool with Spiffy Link to comment Share on other sites More sharing options...
Developers Jos Posted July 1, 2009 Author Developers Share Posted July 1, 2009 Spiff59, as long as a function isn't directly called, and is either in a variable or in a string, Obfuscator doesn't recognize it as being 'in use'. The following directive helps obfuscation, but *NOT* for strip-only obfuscation (which I wish they'd change the operation on: #Obfuscator_Ignore_Funcs=Input_Form1 ; (above does NOT work correctly for strip-only)Thought I did that already? : v 1.0.26.12: Added support for #OnAutoItStartRegister and #ignorefunc. the funcs defined in these directives are not stripped. What version are you testing with? 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...
Developers Jos Posted July 1, 2009 Author Developers Share Posted July 1, 2009 Hello, since many monthes I use the obfuscator with all my scripts without any problem. Now I added many new functions to one of my scripts. The AU3Check works without errors. If I compile the large script with using the obfuscator, the obfuscator crashes at the end of his work, but it seams, the obfuscator has done his job. The AU3Check for obfuscated file runs without errors, also the aut2exe.exe. Crashes means, I got a windows with from XP: "Obfuscator has detect a problem... [close] [send to M$]" [sorry, free translation ] Here an extract of the obfuscator.log 0.00 AutoIt3 Source Obfuscator v1.0.26.13 Copyright © Jos van der Zande May 27, 2009 0.00 CommandLine Params$: 0.00 ============================== Reading Source For Directive ====================================================== 0.36 Ignore Function: onautoitstart 0.36 Ignore Function: onautoitexit 0.36 Directive Params$:/cs=1 /cn=1 /cf=1 /cv=1 /sf=1 /sv=1 ... ... 119.58 =================================================================================================== +> Source 47380 lines 2260239 Characters. +> Stripped 10946 Func/Var lines and 27719 comment lines, Total 1916730 Characters. +> Saved 81% lines 84% Characters. +> Obfuscator v1.0.26.13 finished obfuscating 9327 lines, created:H:\projects\\ruKernelTool\ruKernelTool_V0.1.0.4_Obfuscated.au3 119.64 ############################## Done ##################################################################### I tried to compile this script on a second PC with the same result. I reinstalled autoit and scite completely, nothing helps. What can I do? Many thanks in advance R@inerFirst give the latest Beta version a try and when the hardcrash remains please zip up all needed sourcefiles and PM them to me to recreate the issue and do some debugging. 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...
skyteddy Posted July 1, 2009 Share Posted July 1, 2009 First give the latest Beta version a try and when the hardcrash remains please zip up all needed sourcefiles and PM them to me to recreate the issue and do some debugging.Ok, I tried the Obfuscator 1.0.26.15 (I hope this is the latest beta) and the crash occurs too.I will send you a PMThanks in advanceR@iner Link to comment Share on other sites More sharing options...
Spiff59 Posted July 1, 2009 Share Posted July 1, 2009 (edited) What version are you testing with? With the Ignore_Funcs directive I get these results: ; Autoit v3.3.0.0, Obfuscator 1.0.26.13, Au3Check 1.54.14.0 #Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/so #Obfuscator_Ignore_Funcs=Input_Form1 ; Obfuscator_Ignore_Funcs generates an 'Invalid Compiler directive' from the AutoIT3Wrapper GUI (2.0.0.0) #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** $x = "1" Call("Input_Form" & $x) Exit Func Input_Form1() ; With Obfuscator_Ignore_Funcs, this func makes it into the output from obfuscator. Input_Form1_subfunction(); This line eventually causes Au3Check to generate an "undefined function" error EndFunc Func Input_Form1_subfunction() ; This function doesn't make it into the obfuscated source Beep(800,100) EndFunc So, have I told Obfuscator to simply ignore parsing the Input_Form1() function and pass it through to the output. And that causes any functions/variables first referenced inside the ignored routine to be dropped from the output because Obfuscator considers them unreferenced? Is that what Ignore_Funcs does? Or, is it meant to force the function name onto the list of referenced functions and then still scan/parse the function normally? It may be I could use some sort of Obfuscator_Force_Funcs directive? Edit: Or, I could always use some 'strip' parameters that are less broad than "/so" Edited July 1, 2009 by Spiff59 Link to comment Share on other sites More sharing options...
Developers Jos Posted July 1, 2009 Author Developers Share Posted July 1, 2009 Ok, I tried the Obfuscator 1.0.26.15 (I hope this is the latest beta) and the crash occurs too.I will send you a PMThanks in advanceR@inerUploaded v 1.0.26.16 which should resolve the stack corruption.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...
Developers Jos Posted July 1, 2009 Author Developers Share Posted July 1, 2009 So, have I told Obfuscator to simply ignore parsing the Input_Form1() function and pass it through to the output. And that causes any functions/variables first referenced inside the ignored routine to be dropped from the output because Obfuscator considers them unreferenced? Is that what Ignore_Funcs does?Or, is it meant to force the function name onto the list of referenced functions and then still scan/parse the function normally? It may be I could use some sort of Obfuscator_Force_Funcs directive?Edit: Or, I could always use some 'strip' parameters that are less broad than "/so" Why does this always get more complex than initially anticipated? Just uploaded a new Beta version 1.0.26.17 that will mark Funcs used inside an #Obfuscator_Ignore_Funcs defined func as being used too.See if that works as it should be...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...
Spiff59 Posted July 1, 2009 Share Posted July 1, 2009 Why does this always get more complex than initially anticipated? Just uploaded a new Beta version 1.0.26.17 that will mark Funcs used inside an #Obfuscator_Ignore_Funcs defined func as being used too.See if that works as it should be...JosVersion 1.0.26.17 seems to be working perfectly with the code example I posted above. And if I use the beta AU3Wrapper GUI 2.0.0.1, it doesn't complain about invalid compiler directives. All is right with the world (from my viewpoint, at least).Nicely done, thank you very much, and all that. Link to comment Share on other sites More sharing options...
Ascend4nt Posted July 1, 2009 Share Posted July 1, 2009 (edited) Thought I did that already? : v 1.0.26.12: Added support for #OnAutoItStartRegister and #ignorefunc. the funcs defined in these directives are not stripped. What version are you testing with? Ahh, I was working with an earlier version, I didn't know there was a new version, thought it'd be listed on the first post in this thread. Is there a new place the History of changes is placed? Also, what is the new directive '#ignorefunc' - I didn't see it in the online help. (*edit: found #OnAutoItStartRegister (part of the new beta changes) Thanks! Edited July 1, 2009 by ascendant My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs |Â Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) |Â Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
skyteddy Posted July 1, 2009 Share Posted July 1, 2009 [Obfuscator-Crash] Uploaded v 1.0.26.16 which should resolve the stack corruption. JosIt works without problems! Thank you very much for your quick help! R@iner Link to comment Share on other sites More sharing options...
Recommended Posts