4Eyes Posted August 25, 2011 Posted August 25, 2011 Folks, This may be one for Jos. I'm using AutoIT 3.3.6.1 and Obfuscator 1.0.29.0. I'm having issues with obfuscating my code. It has worked fine prior to using MrCreator's excellent GUICtrlOnHover UDF. The issues relate to liberal use of Call() in the __GUICtrl_SOH_Call() in GUICtrlOnHover.au3. According to post #607 by Jos in this thread: ' I inserted the whole UDF into the end of my projects' code. I'm not certain that Jos was advising to do this, but that's what I got. I first used #Obfuscator_Ignore_Funcs= __GUICtrl_SOH_Call so that this wouldn't be obfuscated but it appears it still is as I get many warning similar to: ... (8128,1) Warning for line:Local $iRet = Call($sFunction) Line 8128 is the first line inside __GUICtrl_SOH_Call() As an alternative to #Obfuscator_Ignore_Funcs= __GUICtrl_SOH_Call I used #Obfuscator_Off directly before the now incorporated UDF code but this introduces a new set of issues such as: ...(37,1) : WARNING: #comments-end has no matching #comments-start. Looking at the obfuscated code (projectname_obfuscated.au3) I see a #ce statement that indeed has no matching #cs but that's because the #cs and comment lines have been removed by the obfuscator but not the #ce. I can fix this by removing #cs/#ce blocks in the source although I'd prefer to leave them for readability's sake. However, as I use Opt("MustDeclareVars", 1) there's a real showstopper with errors such as: project_Obfuscated.au3(43101,32) : WARNING: $A1C00002A0Esz_ possibly not declared/created yet $A1C00002A0Esz_=A1C00002A0Ex_() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ project_Obfuscated.au3(43111,43) : WARNING: $A1C00002A0Es2_ possibly not declared/created yet $A1C00002A0Es2_ = Execute($A1C00002A0Es1_) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ Looking at the obfuscated code around line 43101 (which is in the code appended by the obfuscator itself) I see: Func A1C00002A0E_() global $Os For $ax0x0xa = 0x01 to 0x05 $A1C00002A0Esz_=A1C00002A0Ex_() As nobody else seems to be reporting this I'm suspecting I've done something really stupid, but for the life of me I can't see it. I've in front of this pc for nearly 12 hours now and my brain is fried. I really hope somebody will be kind enough to look at this and advise. Thanks.
Syed23 Posted August 25, 2011 Posted August 25, 2011 I face the similar issue! But i am not using GUICtrlOnHover UDF on my project, But still i am facing this issue whenever i run Obfuscator... one thing i could able to compile successfully if i am not using Obfuscator...if i use Obfuscator it shows me Variable not declared yet on WINAPI UDF, SQL UDF and etc.... there is something else which we have to think on ? Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font]
Developers Jos Posted August 25, 2011 Developers Posted August 25, 2011 There is no way Obfuscator can understand this properly:Local $iRet = Call($sFunction) Hence the warnings/errors. there is no easy answer for you and it all comes down to understanding how Obfuscator works to know how to fix this. 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.
4Eyes Posted August 25, 2011 Author Posted August 25, 2011 Jos, It appears you didn't understand my post. I am aware that the obfuscator can't handle Local $iRet = Call($sFunction) but that is not the point. There are 3 issues: 1) comment blocks (#cs/#ce) are not handled properly 2) #Obfuscator_Ignore_Funcs= __GUICtrl_SOH_Call doesn't bypass obfuscation of the function 3) #Obfuscator_Off doesn't turn it off Coming to think of it, 1 function obfuscated out of the whole UDF is really dumb, so point 2 while still is outstanding but in this case would cause other issue anyway, so forget about that. Jos and all, could you please re-evaluate these issues and advise?
jvanegmond Posted August 25, 2011 Posted August 25, 2011 Post your script (or preferably reproducer) and your obfuscator.log, might be simple problem but I doubt it. #Obfuscator_Off should work, but it's probably failing because of surrounding code. Same with #Obfuscator_Ignore_Funcs=. Make sure you're also using latest obfuscator. github.com/jvanegmond
4Eyes Posted August 25, 2011 Author Posted August 25, 2011 Manadar, Thanks for your reply. First post says using Obfuscator 1.0.29.0 which is the latest I can find. "#Obfuscator_Off should work" - hmmm... it's at the end of the script with just the UDF after it. "Same with #Obfuscator_Ignore_Funcs=" ... it's at top of code after compiler directives and before #include's. The script is nearly 8000 lines so will try to come up with a reproducer. I think I'll have to abandon the UDF for this project or drop a little functionality due to time constraints which is a real bummer. I'll try to come with example code to demonstrate the issues.
Developers Jos Posted August 26, 2011 Developers Posted August 26, 2011 There are 3 issues:1) comment blocks (#cs/#ce) are not handled properly2) #Obfuscator_Ignore_Funcs= __GUICtrl_SOH_Call doesn't bypass obfuscation of the function3) #Obfuscator_Off doesn't turn it offComing to think of it, 1 function obfuscated out of the whole UDF is really dumb, so point 2 while still is outstanding but in this case would cause other issue anyway, so forget about that.Jos and all, could you please re-evaluate these issues and advise?What is the problem with 1) ?The other item work fine to my knowledge, did you check the produced obfuscator.log to see what happened?As mentioned, show a simple reproducer that shows the 3 issues so we can have a look.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
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