this-is-me Posted March 11, 2014 Share Posted March 11, 2014 I am interested in using Obfuscator with the /striponly option to reduce the size of an output file. I use obfuscator exclusively through AutoIt3Wrapper, where I can't see output of obfuscator to see if there are problems. A few of my scripts are showing issues. This is a short example of how the problem happens. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_type=a3x #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/striponly #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** _SetTimeout(2000, Bugme, 5) Sleep(5000) Func Bugme($number) MsgBox(0,$number,"bugged") EndFunc Func _SetTimeout($time, $func, $param1) Sleep($time) Call(FuncName($func), $param1) EndFunc The output from Au3Check on the Obfuscated file is as so: "C:Users-----Desktoptest_Obfuscated.au3"(1,24) : error: Bugme(): undefined function. _SetTimeout(2000, Bugme, ~~~~~~~~~~~~~~~~~~~~~~~^ C:Users-----Desktoptest_Obfuscated.au3 - 1 error(s), 0 warning(s) Which means that Obfuscator removed Bugme. Will this happen when Au3Stripper replaces Obfuscator? Who else would I be? Link to comment Share on other sites More sharing options...
Zedna Posted March 12, 2014 Share Posted March 12, 2014 (edited) There are two possible problems with your script: 1) missing apostrophes around Bugme try _SetTimeout(2000, 'Bugme', 5) instead of _SetTimeout(2000, Bugme, 5) 2) try to add: #Obfuscator_Ignore_Funcs=BugMe So I think this is NOT bug of obfuscator EDIT: I'm not familiar with new AutoIt's syntax so maybe those missing apostrophes are "by purpose". If so then ignore my post ... Edited March 12, 2014 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
mLipok Posted March 12, 2014 Share Posted March 12, 2014 A few of my scripts are showing issues. This is a short example of how the problem happens. Did you try: #Obfuscator_Ignore_Funcs=_SetTimeout, Bugme or #Obfuscator_Off #Obfuscator_On #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_type=a3x #AutoIt3Wrapper_Run_Obfuscator=y ;~ #Obfuscator_Ignore_Funcs=_SetTimeout, Bugme #Obfuscator_Parameters=/striponly #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** _SetTimeout(2000, Bugme, 5) Sleep(5000) #Obfuscator_Off Func Bugme($number) MsgBox(0, $number, "bugged") EndFunc ;==>Bugme Func _SetTimeout($time, $func, $param1) Sleep($time) Call(FuncName($func), $param1) EndFunc ;==>_SetTimeout #Obfuscator_On Will this happen when Au3Stripper replaces Obfuscator? Very interesting question. Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Developers Solution Jos Posted March 12, 2014 Developers Solution Share Posted March 12, 2014 Au3stripper is able to handle the new Bugme() func notation but obviously not the Call() statement. D:DevelopmentAutoIt3programstesttest.au3(16,1) Warning for line:Call(FuncName($func), $param1) 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...
this-is-me Posted March 12, 2014 Author Share Posted March 12, 2014 Au3stripper is able to handle the new Bugme() func notation but obviously not the Call() statement. Jos I am sorry to say I don't know what might be wrong with the call statement. Is it formatted incorrectly, or are you simply saying that it will throw an ignorable error? Who else would I be? Link to comment Share on other sites More sharing options...
FireFox Posted March 12, 2014 Share Posted March 12, 2014 Use this syntax instead : #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_type=a3x #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/striponly #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** _SetTimeout(2000, "Bugme", 5) Sleep(5000) Func Bugme($number) MsgBox(0,$number,"bugged") EndFunc Func _SetTimeout($time, $func, $param1) Sleep($time) Call($func, $param1) EndFunc There is no reason to use FuncName in anyway... Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted March 12, 2014 Share Posted March 12, 2014 #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_type=a3x #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/striponly #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** _SetTimeout(2000, Bugme, 5) Sleep(5000) Func Bugme($number) MsgBox(0,$number,"bugged") EndFunc Func _SetTimeout($time, $func, $param1) Sleep($time) $func($param1) EndFunc "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
Developers Jos Posted March 12, 2014 Developers Share Posted March 12, 2014 (edited) I am sorry to say I don't know what might be wrong with the call statement. Is it formatted incorrectly, or are you simply saying that it will throw an ignorable error? There is no syntax error but Obfuscator (and au3stripper) have no way to determine the value of the variable ... hence the warning. This has been explained too many time by me to go in further details. Jos Edited March 12, 2014 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...
this-is-me Posted March 12, 2014 Author Share Posted March 12, 2014 @Jos et al, Thanks for your help. @Zedna, @Firefox, The reason I use the function name without quotes is for ease of access in SciTE4AutoIt3. If you quote the function you can't do a CTRL+J to jump to the function. Unquoted functions can be jumped to. Who else would I be? Link to comment Share on other sites More sharing options...
FireFox Posted March 12, 2014 Share Posted March 12, 2014 Then use the syntax DatMCEyeBall showed Link to comment Share on other sites More sharing options...
this-is-me Posted March 12, 2014 Author Share Posted March 12, 2014 (edited) @FireFox, nice idea, but I can also add more parameters with a CallArgArray if I use call instead of $func(). See an example: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile_type=a3x #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/striponly #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** _SetTimeout(2000, MsgBox, param(0, "bugged", "hello")) Sleep(5000) Func _SetTimeout($time, $func, $param1) Sleep($time) Call($func, $param1) EndFunc Func param($1=0, $2=0, $3=0, $4=0, $5=0, $6=0, $7=0, $8=0, $9=0, $10=0, $11=0, $12=0, $13=0, $14=0, $15=0, $16=0, $17=0, $18=0, $19=0, $20=0, $21=0, $22=0, $23=0, $24=0, $25=0, $26=0, $27=0, $28=0, $29=0, $30=0, $31=0, $32=0, $33=0, $34=0, $35=0, $36=0, $37=0, $38=0, $39=0, $40=0, $41=0, $42=0, $43=0, $44=0, $45=0, $46=0, $47=0, $48=0, $49=0, $50=0, $51=0, $52=0, $53=0, $54=0, $55=0, $56=0, $57=0, $58=0, $59=0, $60=0, $61=0, $62=0, $63=0, $64=0, $65=0, $66=0, $67=0, $68=0, $69=0, $70=0, $71=0, $72=0, $73=0, $74=0, $75=0, $76=0, $77=0, $78=0, $79=0, $80=0, $81=0, $82=0, $83=0, $84=0, $85=0, $86=0, $87=0, $88=0, $89=0, $90=0, $91=0, $92=0, $93=0, $94=0, $95=0, $96=0, $97=0, $98=0, $99=0, $100=0) Local $arr[@NumParams + 1] = ["CallArgArray"] For $i = 1 To @NumParams $arr[$i] = Eval($i) Next Return $arr EndFunc EDIT: removed funcname Edited March 12, 2014 by this-is-me Who else would I be? 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