AZJIO Posted July 29, 2013 Posted July 29, 2013 Before you confuse the code you should use the "/om" Can do that local variables declared in the beginning of the function started with $a? My other projects or all
Developers Jos Posted July 29, 2013 Author Developers Posted July 29, 2013 Before you confuse the code you should use the "/om" Can do that local variables declared in the beginning of the function started with $a? Sorry, but my brain's interpreter has problems understanding what you are telling me. 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.
AZJIO Posted July 30, 2013 Posted July 30, 2013 "/om" forces to lose names of variables and functions forever My other projects or all
Developers Jos Posted July 30, 2013 Author Developers Posted July 30, 2013 "/om" forces to lose names of variables and functions forever That statement is also valid with the standard Obfuscation, it just makes shorter variable and func names. That still leaves me wondering what your question was. 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.
michaelslamet Posted August 4, 2013 Posted August 4, 2013 Jos, Thanks a lot for this wonderful tool Is the obfuscated script always need FileInstall? Could we tell him not using FileInstall, maybe using some parameter or something like that?
Developers Jos Posted August 4, 2013 Author Developers Posted August 4, 2013 (edited) Jos, Thanks a lot for this wonderful tool Is the obfuscated script always need FileInstall? Yes... but what is the problem? Edited August 4, 2013 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.
michaelslamet Posted August 4, 2013 Posted August 4, 2013 (edited) Yes... but what is the problem? Edit: forget it Edited August 8, 2013 by michaelslamet
michaelslamet Posted August 8, 2013 Posted August 8, 2013 I got this error when I try to obsfucate one of my script: -### Obfuscation Error: Found Call() statement using unsolvable Func, which will/could lead to problems running your obfuscated script. >### current Func: _FTP_ProgressUpload C:\Program Files\AutoIt3\include\FTPEx.au3(1232,1) Warning for line:$ret = Call($FunctionToCall, ($done / $glen) * 100) I know "Call" function is not supported, so I try to disable obfuscator for this function: #Obfuscator_Ignore_Funcs=_FTP_ProgressUpload It still throw the same error, this directive didn't honoured. Did I do something wrong here?
Developers Jos Posted August 8, 2013 Author Developers Posted August 8, 2013 (edited) The directive doesn't mean it won't read the statements in that Func, but merely will ensure the Name of that function won't be Obfuscated (Changed) or stripped. Jos Edited August 8, 2013 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.
michaelslamet Posted August 8, 2013 Posted August 8, 2013 The directive doesn't mean it won't read the statements in that Func, but merely will ensure the Name of that function won't be Obfuscated (Changed) or stripped. Jos Aha, got it! Thanks a lot, Jos, for providing us this great tool and providing your precious time answering our questions
wraithdu Posted August 8, 2013 Posted August 8, 2013 (edited) I know "Call" function is not supported, so I try to disable obfuscator for this function: #Obfuscator_Ignore_Funcs=_FTP_ProgressUpload You're actually using that directive incorrectly. The warning is referring to the Call() line. Call($FunctionToCall, ... So you need to add the name of the function referenced by $FunctionToCall. So if it was _FTP_Callback, then #Obfuscator_Ignore_Funcs=_FTP_Callback The name of the function containing the Call() statement, in this case _FTP_ProgressUpload, is irrelevant. Edited August 8, 2013 by wraithdu
michaelslamet Posted August 8, 2013 Posted August 8, 2013 Noted with thanks, Wraithdu I found strange behaviour with Obfuscator: #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 global $file_version = FileGetVersion(@ScriptFullPath) msgbox(0,"", $file_version) Original script (un-obfuscated) will display msgbox "1.0.0.0" while obfuscated script will display "3.3.8.1" (my AutoIT version), both run compiled. Where did I do wrong here?
michaelslamet Posted August 9, 2013 Posted August 9, 2013 After sucessfully obfuscated some of my scripts, I'm stuck with this one: The original script is about 2472 lines. The obfuscation process is smooth without error or whatsoever: >"C:\Program Files\AutoIt3\SciTE\Obfuscator\Obfuscator.exe" "C:\Documents and Settings\Windows\My Documents\App\myscript.au3" - Iteration 1 Strip Functions result: Output 9171 lines and stripped 22154 lines - Iteration 2 Strip Variables result: Output 9171 lines and stripped 0 lines - Iteration 3 Start the actual Obfuscation. +> Source 79398 lines 3961082 Characters. +> Stripped 22154 Func/Var lines and 48067 comment lines, Total 3552739 Characters. +> Saved 88% lines 89% Characters. +> Obfuscator v1.0.30.4 finished obfuscating 9716 lines, created:C:\Documents and Settings\Windows\My Documents\App\myscript_Obfuscated.au3 >Exit code: 0 Time: 47.399 But when I run the obfuscated script, it throw 141 errors, mostly "ERROR: $Variable_name_here previously declared as a 'Const'." and "ERROR: Function_name_here() already defined." C:\Documents and Settings\Windows\My Documents\App\myscript_Obfuscated.au3(1676,49) : ERROR: $A121A604036 previously declared as a 'Const'. Global Const $A121A604036 = Number($A38EBF0172A) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Windows\My Documents\App\myscript_Obfuscated.au3(1677,49) : ERROR: $A0E1A805D06 previously declared as a 'Const'. Global Const $A0E1A805D06 = Number($A57FB001D5E) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Windows\My Documents\App\myscript_Obfuscated.au3(1678,49) : ERROR: $A471AA0553D previously declared as a 'Const'. Global Const $A471AA0553D = Number($A59FB103753) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Windows\My Documents\App\myscript_Obfuscated.au3(1895,31) : ERROR: A1E00F0005C() already defined. Func A1E00F0005C($A016BF04850) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Windows\My Documents\App\myscript_Obfuscated.au3(1904,19) : ERROR: A2310006224() already defined. Func A2310006224() ~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\Windows\My Documents\App\myscript_Obfuscated.au3(1913,31) : ERROR: A2510102060() already defined. Func A2510102060($A561BE05A60) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ I need help
michaelslamet Posted August 9, 2013 Posted August 9, 2013 I have totally given up putting any effort in explaining it anymore. If people are really too lazy/uneducated/or-what-ever-other-reason-they-have, than they should not use the tool. Jos I'm trying to educate myself by reading from first page of this thread so I have a "right" to use this amazing tool
Developers Jos Posted August 9, 2013 Author Developers Posted August 9, 2013 (edited) Noted with thanks, Wraithdu I found strange behaviour with Obfuscator: #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 global $file_version = FileGetVersion(@ScriptFullPath) msgbox(0,"", $file_version) Original script (un-obfuscated) will display msgbox "1.0.0.0" while obfuscated script will display "3.3.8.1" (my AutoIT version), both run compiled. Where did I do wrong here? This is because the #AutoIt3Wrapper directives are stripped from the Obfuscated source. Just use F7 (Compile) from SciTE on the original source and Run Obfuscator by including this line as well at the top and let AutoIt3Wrapper do the work for you: #AutoIt3Wrapper_Run_Obfuscator=y Jos Edited August 9, 2013 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.
Developers Jos Posted August 9, 2013 Author Developers Posted August 9, 2013 (edited) I need help .. and I need a working crystal ball to be able to help you. Looking at your last post, you did go back enough in this thread to know what it is I would need to be able to help Jos Edited August 9, 2013 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.
michaelslamet Posted August 9, 2013 Posted August 9, 2013 This is because the #AutoIt3Wrapper directives are stripped from the Obfuscated source. Just use F7 (Compile) from SciTE on the original source and Run Obfuscator by including this line as well at the top and let AutoIt3Wrapper do the work for you: #AutoIt3Wrapper_Run_Obfuscator=y Jos Noted about the directives that are stripped from the Obfuscated source, but it doesn't work like expected. These are directives on the original script: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/sf 1 #obfuscator_Ignore_Funcs=Callback #AutoIt3Wrapper_Icon=Icons\myscript.ico #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Change2CUI=y #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=(c) me #AutoIt3Wrapper_Res_SaveSource=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** When I compile (Ctrl+F7) or F7 (build), the obfuscator doesn't automatic copy those directives to the obfuscated script. When I manually copy-paste these directives to the obfuscated script, the FileVersion works as expected: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=Icons\myscript.ico #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_Change2CUI=y #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=(c) me #AutoIt3Wrapper_Res_SaveSource=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Why it doesn't copy those directives to the obfuscated code? Do I place it on the wrong position/line? Thanks, Jos
Developers Jos Posted August 9, 2013 Author Developers Posted August 9, 2013 (edited) It doesn't need to copy them as AutoIt3Wrapper already knows what to do from the original source. What is does is: - read the directives - Obfuscate's the script into the new source file - AUT2EXE the new source file - Modifies the Resources of the output EXE So, as you can see, there is no need for these lines in the source used by AUT2EXE. Jos Edited August 9, 2013 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.
michaelslamet Posted August 9, 2013 Posted August 9, 2013 (edited) .. and I need a working crystal ball to be able to help you. Looking at your last post, you did go back enough in this thread to know what it is I would need to be able to help Jos Haha, I need a working crystal ball too After few hours trial and error and experiment with various obfuscator parameter, I found where exactly the problem is and the solution. I managed to find out there are few include files on the script folder, that also available in AutoIT Include's folder. So those include files are double, one at the script folder and another at the Include folder. AutoIt3Wrapper know the different between #include <include-file.au3> and #include "include-file.au3", but seems the obfuscator doesn't know? The obfuscator search on the script folder for the include file when it should search on the include folder and then when it found the include file on the include folder, it create the obfuscated code one more time resulting in error (var/const and function already defined). Is that the case? Edited August 9, 2013 by michaelslamet
Developers Jos Posted August 9, 2013 Author Developers Posted August 9, 2013 AutoIt3Wrapper know the different between #include <include-file.au3> and #include "include-file.au3", but seems the obfuscator doesn't know?The obfuscator search on the script folder for the include file when it should search on the include folder and then when it found the include file on the include folder, it create the obfuscated code one more time resulting in error (var/const and function already defined). Is that the case? It should be the case that when just a filename is used as include the following sequence is used to find the include: #Include<Filename> : Standard Autoit3 Include directory User defined Include directories Script directory #Include"Filename": The reverse of the above. Is that not the case? 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.
Recommended Posts