nickston Posted February 9, 2011 Share Posted February 9, 2011 (edited) You can force func's to be kept in all cases by specifying them in:It's not good idea. for specify func its need know this func.Strip functions is strip functions.My script works well (in any post above), but its wish do with buildin tool (obfuscator) Edited February 9, 2011 by nickston Link to comment Share on other sites More sharing options...
Developers Jos Posted February 9, 2011 Author Developers Share Posted February 9, 2011 (edited) It's not good idea. for specify func its need know this func. Strip functions is strip functions. My script works well (in any post above), but its wish do with buildin tool (obfuscator) I didn't look at your script but don't see how you ever can figure our what func is called with this statement: Call($TRAYNOTIFYIDS[$nID][5], $nID, $lParam) So how do you figure out what Func's to strip that aren't used in these cases? Open for suggestions. Jos Edited February 9, 2011 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...
nickston Posted February 10, 2011 Share Posted February 10, 2011 I didn't look at your script but don't see how you ever can figure our what func is called with this statement: Call($TRAYNOTIFYIDS[$nID][5], $nID, $lParam) So how do you figure out what Func's to strip that aren't used in these cases? Open for suggestions. Jos all is very simple. see at include: the "Call($TRAYNOTIFYIDS[$nID][5], $nID, $lParam)" is placed in "Func _TrayNotifyIcon($hWnd, $Msg, $wParam, $lParam)" (string 382) the "_TrayNotifyIcon" is placed in "Func _TrayWndProc($hWnd, $Msg, $wParam, $lParam)" (string 375) the "_TrayWndProc" is placed in "GUIRegisterMsg($TRAYTIPMSG, "_TrayWndProc") " (string 230) look at this I think what obfuscator don't see GUIRegisterMsg and then all other Link to comment Share on other sites More sharing options...
Developers Jos Posted February 10, 2011 Author Developers Share Posted February 10, 2011 (edited) all is very simple. see at include: the "Call($TRAYNOTIFYIDS[$nID][5], $nID, $lParam)" is placed in "Func _TrayNotifyIcon($hWnd, $Msg, $wParam, $lParam)" (string 382) the "_TrayNotifyIcon" is placed in "Func _TrayWndProc($hWnd, $Msg, $wParam, $lParam)" (string 375) the "_TrayWndProc" is placed in "GUIRegisterMsg($TRAYTIPMSG, "_TrayWndProc") " (string 230) look at this I think what obfuscator don't see GUIRegisterMsg and then all other You haven't answered my question: How should Obfuscator know what the content is of $TRAYNOTIFYIDS[$nID][5] so it knows what FUNC this CALL() statement is calling? Obfuscator does a recursive logic to determine what func is use where, so I can assure you that even if the used FUNC is 10 levels deep, that it will leave all 9 higher level FUNCs in the source. My guess is that you call the missing FUNC via this Call($TRAYNOTIFYIDS[$nID][5], $nID, $lParam) which makes it being stripped. Jos Edited February 10, 2011 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...
nickston Posted February 10, 2011 Share Posted February 10, 2011 (edited) You haven't answered my question: How should Obfuscator know what the content is of $TRAYNOTIFYIDS[$nID][5] so it knows what FUNC this CALL() statement is calling? Obfuscator does a recursive logic to determine what func is use where, so I can assure you that even if the used FUNC is 10 levels deep, that it will leave all 9 higher level FUNCs in the source. My guess is that you call the missing FUNC via this Call($TRAYNOTIFYIDS[$nID][5], $nID, $lParam) which makes it being stripped. Jos Obfuscator don't need to know what content is of $TRAYNOTIFYIDS[$nID][5]. this value of array contents user defined function. that function is determining by user in his script. 1) I defines the one func for all entries of this array field's. and this func is realy exists. 2) I Compiling script without obfuscator (or use my script) and he is working. (ie func is exists) therefore I can't call missing finc. and nevertheless obfuscator remove used function. Edited February 10, 2011 by nickston Link to comment Share on other sites More sharing options...
Developers Jos Posted February 10, 2011 Author Developers Share Posted February 10, 2011 (edited) Obfuscator don't need to know what content is of $TRAYNOTIFYIDS[$nID][5]. this value of array contents user defined function. that function is determining by user in his script. 1) I defines the one func for all entries of this array field's. and this func is realy exists. 2) I Compiling script without obfuscator (or use my script) and he is working. (ie func is exists) therefore I can't call missing finc. and nevertheless obfuscator remove used function. No idea what you are trying to tell me. What about you create a "simple" script that shows what you exactly mean. so no includes just a simple script with one or two FUNCs that demonstrates that Obfuscator strips a FUNC with the /so option and how/why you think is shouldn't? Jos Edited February 10, 2011 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...
wraithdu Posted February 10, 2011 Share Posted February 10, 2011 (edited) @nickston You don't get it. Every function has a name, ie MyFunc. Obfuscator has no way to resolve a variable containing a function's name (string) in order to determine if it's being used. Just take Jos's advice and use the #Obfuscator_Ignore_Funcs directive. If user's of your script/UDF/whatever can define their own functions, then they'll need to take responsibility for adding their own functions to the ignore list as well. Edited February 10, 2011 by wraithdu Link to comment Share on other sites More sharing options...
nickston Posted February 10, 2011 Share Posted February 10, 2011 No idea what you are trying to tell me.What about you create a "simple" script that shows what you exactly mean. so no includes just a simple script with one or two FUNCs that demonstrates that Obfuscator strips a FUNC with the /so option and how/why you think is shouldn't?Josi trying tell what obfuscator remove functions which needed for script.why and how i dont know ie i dont know how its work.I have this behavor only with include.for simple, i have two compilation of my script without obfuscator and with. Compilation without is working, with dont.I mean what obfuscator doing something wrong. and i supposed what obfuscator remove function. Link to comment Share on other sites More sharing options...
nickston Posted February 10, 2011 Share Posted February 10, 2011 (edited) @nickstonYou don't get it. Every function has a name, ie MyFunc. Obfuscator has no way to resolve a variable containing a function's name (string) in order to determine if it's being used. Just take Jos's advice and use the #Obfuscator_Ignore_Funcs directive. If user's of your script/UDF/whatever can define their own functions, then they'll need to take responsibility for adding their own functions to the ignore list as well.Why?well ok, We have same aim.then say me why obfuscator cant do this, but my script can? Edited February 10, 2011 by nickston Link to comment Share on other sites More sharing options...
Developers Jos Posted February 10, 2011 Author Developers Share Posted February 10, 2011 (edited) i trying tell what obfuscator remove functions which needed for script.why and how i dont know ie i dont know how its work.I have this behavor only with include.for simple, i have two compilation of my script without obfuscator and with. Compilation without is working, with dont.I mean what obfuscator doing something wrong. and i supposed what obfuscator remove function.The stripfunc works very simple.. steps:1. list all available Func's and keep them in a table2. Keep track of all Funcs calling other funcs in a table by checking all Function parameters that call FUNCs3. After this whole process is finished you strip a Funcs that are never call directly or indirectly.So for step 2 it is important to know exactly what a CALL() statement is calling and that is why Call("abc") is fine and CALL($ABC) is wrong. There is no real difference between scripts with or without includes as #Include's are inserted at the place the #include statement is located and it all becomes one scriptfile.Anyway ... There is no problem with Obfuscator's StripFunc functionality unless you have a simple script that shows me the bug.Jos Edited February 10, 2011 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...
BrewManNH Posted February 10, 2011 Share Posted February 10, 2011 Your script interprets the variable at run time, Obfuscator doesn't run your script, it looks at the contents, sees a function that isn't used and removes it. The reason it doesn't see it being used anywhere in your script is because you're using a variable to call it, this variable's contents will NEVER be known by obfuscator. Either change how you access these functions, even by using a dummy function call that never gets run (which isn't hard to do at all), or using the #Obfuscator_Ignore_Funcs command that you've been told to use to prevent this. 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 Link to comment Share on other sites More sharing options...
nickston Posted February 10, 2011 Share Posted February 10, 2011 (edited) Your script interprets the variable at run time, Obfuscator doesn't run your script, it looks at the contents, sees a function that isn't used and removes it. The reason it doesn't see it being used anywhere in your script is because you're using a variable to call it, this variable's contents will NEVER be known by obfuscator. Either change how you access these functions, even by using a dummy function call that never gets run (which isn't hard to do at all), or using the #Obfuscator_Ignore_Funcs command that you've been told to use to prevent this.about "my script" i mean script in the first post. this script also remove unused funcs. and its work dont run script.to the point, it's script dont search "call" (but in this case its work).... hm ...its my omission Edited February 10, 2011 by nickston Link to comment Share on other sites More sharing options...
GEOSoft Posted February 10, 2011 Share Posted February 10, 2011 Your script may or may not work, I'm not testing it to find out since I did notice a lot of convoluted code in it. You may have also made a bad assumption here. Don't assume that Jos could just take your function and put it into Obfuscator. Just because a tool is used in AutoIt doesn't mean that it is written in AutoIt. Tidy is a perfect example, it's used as a tool for AutoIt scripts but it's not written in AutoIt so any code you write would have to be re-written to be used. If you want to write a script that does something for youur scripts then by all means fly at it but don't expect it to be used elsewhere. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Developers Jos Posted February 10, 2011 Author Developers Share Posted February 10, 2011 Had a quick look at your script and believe you do a StringInstr() in all records with the FuncNames stored in the array and when found assume the Func is used... correct? Your script errors out for me when run it against a simple script like this: #obfuscator_parameters=/so $a = 1 B($a) ; Func A() $notused=1 EndFunc ; Func B() $used=1 aa() EndFunc ; Func AA() $used=1 EndFunc ; Func BB() $notused=1 EndFunc So what is the output of your script? 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...
nickston Posted February 10, 2011 Share Posted February 10, 2011 Your script may or may not work, I'm not testing it to find out since I did notice a lot of convoluted code in it.You may have also made a bad assumption here.Don't assume that Jos could just take your function and put it into Obfuscator. Just because a tool is used in AutoIt doesn't mean that it is written in AutoIt. Tidy is a perfect example, it's used as a tool for AutoIt scripts but it's not written in AutoIt so any code you write would have to be re-written to be used. If you want to write a script that does something for youur scripts then by all means fly at it but don't expect it to be used elsewhere.i agree with you, my script may not work. I write its only for verify can strip funcs and with it compiled script will working.my func is only simple example.i assume so: if obfuscator don't work in my case then may be it can be modified. its worse dont be. a fortiori its possible making (for verify that i write my script).i think so, the one ability of obfuscator strip funcs. why its ability dont make better?my be people silence about this:) Link to comment Share on other sites More sharing options...
nickston Posted February 10, 2011 Share Posted February 10, 2011 (edited) Had a quick look at your script and believe you do a StringInstr() in all records with the FuncNames stored in the array and when found assume the Func is used... correct? Your script errors out for me when run it against a simple script like this: #obfuscator_parameters=/so $a = 1 B($a) ; Func A() $notused=1 EndFunc ; Func B() $used=1 aa() EndFunc ; Func AA() $used=1 EndFunc ; Func BB() $notused=1 EndFunc So what is the output of your script? ok, my script just only exemple for its working you script must be in include. for deal: #obfuscator_parameters=/so $a = 1 B($a) ; ; Func B() $used=1 aa() EndFunc ; Func AA() $used=1 EndFunc ; i'm in up post write what my script don't search 'call'. its add not hard. about 'bug' i think obfuscator remove my function in my script not in include.'my function' is function which i submit for $TRAYNOTIFYIDS[$nID][5] and on her Call obfuscator event error. my strip script dont strip start script only for include. Edited February 10, 2011 by nickston Link to comment Share on other sites More sharing options...
Developers Jos Posted February 10, 2011 Author Developers Share Posted February 10, 2011 (edited) ok, my script just only exemplefor its working you script must be in include.for deal:i'm in up post write what my script don't search 'call'.Huh? I give up for the moment because we are not getting anywhere here.Post an example as requested and we continue the discussion what is right or wrong in Obfuscator's stripFunc routine.Jos Edited February 10, 2011 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...
nickston Posted February 10, 2011 Share Posted February 10, 2011 (edited) Huh? I give up for the moment because we are not getting anywhere here.Post an example as requested and we continue the discussion what is right or wrong in Obfuscator's stripFunc routine.Joswell, i understand diferent of obfuscator and my strip script.I was wrong. I think obfuscator strip wrong include, but obfuscator strip my start script.My strip script striping only includes, therefor all is ok.its like obfuscator with key /striponlyinclude,in meaning of striping functions.thanks for all, put me at rigth way. Edited February 10, 2011 by nickston Link to comment Share on other sites More sharing options...
MvGulik Posted March 11, 2011 Share Posted March 11, 2011 (edited) Artifact.Scite4autoit3: Tool: Jump to function ..., Ignoring User-Lib file IF same file(name) is also present as Autoit3-Lib file.;; Scite4AutoIt3, Jump to Function ... -> jumps to "..\autoit3\included\Date.au3" even if a "Date.au3" is precent as User-Lib file. ;; (not so with Local "Date.au3" file present. Local file is opened.) #include "Date.au3" _Now()E:Use -> User Edited March 30, 2011 by iEvKI3gv9Wrkd41u "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
HimashuGoel Posted March 29, 2011 Share Posted March 29, 2011 I have just downloaded this version of SciTE but the program won't work it says " Runtime Error! Floating point support not loaded " Then it closes itself.Please help. Link to comment Share on other sites More sharing options...
Recommended Posts