Developers Jos Posted May 27, 2009 Author Developers Share Posted May 27, 2009 Hello Jos,just downloaded and installed the latest SciTE version. Now I have a problem related to obfuscator I hadnt before .Following example was obfuscated with Obfuscator build on 2008-Dec-08 (1.0.25?) without any problems. The new build of Obfuscator doesn't work anymore.Thanks for you efforts!Found the issue. This is was a clear case of fixing one thing and breaking another Please try the current Beta v 1.0.26.13 available to see if that fixes it also for you.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...
KaFu Posted May 27, 2009 Share Posted May 27, 2009 Please try the current Beta v 1.0.26.13 available to see if that fixes it also for you.It does, perfect , thanks a lot for the quick response!Best Regards 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...
wraithdu Posted June 3, 2009 Share Posted June 3, 2009 (edited) This script causes errors- #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/cs=0 /cn=1 /cf=1 /cv=1 /sf=1 /sv=1 If $CmdLine[0] <> 0 Then ConsoleWrite("argh" & @CRLF) Errors- C:\Users\Erik\Desktop\test_Obfuscated.au3(1,41) : WARNING: $Os: possibly used before declaration. global $A2A00304415=A5000202637($Os[0x1]) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\Erik\Desktop\test_Obfuscated.au3(1,41) : ERROR: $Os: undeclared global variable. global $A2A00304415=A5000202637($Os[0x1]) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\Erik\Desktop\test_Obfuscated.au3(1,41) : ERROR: A5000202637(): undefined function. global $A2A00304415=A5000202637($Os[0x1]) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ The errors do not occurr if I change either /cs=1 or /cn=0. I found this by accident cause /cs=1 was tripping my antivirus. Edited June 3, 2009 by wraithdu Link to comment Share on other sites More sharing options...
Developers Jos Posted June 3, 2009 Author Developers Share Posted June 3, 2009 (edited) This script causes errors- #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/cs=0 /cn=1 /cf=1 /cv=1 /sf=1 /sv=1 If $CmdLine[0] <> 0 Then ConsoleWrite("argh" & @CRLF) Errors- The errors do not occurr if I change either /cs=1 or /cn=0. I found this by accident cause /cs=1 was tripping my antivirus.Fixed in the version 1.0.26.14 available in the Beta directory. Thanks jos Edited June 3, 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...
wraithdu Posted June 3, 2009 Share Posted June 3, 2009 That seems to have fixed it, thanks! Link to comment Share on other sites More sharing options...
Shark007 Posted June 17, 2009 Share Posted June 17, 2009 (edited) I'm having a problem with the obfuscator. It gives me the following error message. ### Obfuscation Error: Found Call() statement using unsolvable Func, which will/could lead to problems running your obfuscated script. >### current Func: Reset_Defaults H:\settings\Settings.au3(65,1) Warning for line:Call($arrFunctions[$i][0]) I have been trying to troubleshoot this issue on my own for several weeks already, but have not been able to resolve it. I've stripped my script down to a bare minimum for you to have a look. #removed The script compiles and functions fine if I choose to ignore the error message but I'd rather deal with it than ignore it. Please offer some advice to avoid the error message. Edited July 2, 2009 by Shark007 Link to comment Share on other sites More sharing options...
KaFu Posted June 17, 2009 Share Posted June 17, 2009 Go one page back and read this#660934 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...
Spiff59 Posted June 17, 2009 Share Posted June 17, 2009 I'm assuming Obsfuscator already has code in it that builds a list of all referenced variables within a script so that the /StripOnly function will know which chunks of #includes can be omitted. I find, after going through multiple revisions of a large script, that I'll end up with some user-defined variables that are now no longer referenced within the script. Would it be difficult to enable obfuscator to remove, or at least list, unreferenced user-defined variables? It is a pain-in-the-rear to manually do cleanup by reviewing all dim/local/global statements and doing searches on every variable to see if they are being used. Thanks. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 17, 2009 Moderators Share Posted June 17, 2009 I'm assuming Obsfuscator already has code in it that builds a list of all referenced variables within a script so that the /StripOnly function will know which chunks of #includes can be omitted. I find, after going through multiple revisions of a large script, that I'll end up with some user-defined variables that are now no longer referenced within the script. Would it be difficult to enable obfuscator to remove, or at least list, unreferenced user-defined variables? It is a pain-in-the-rear to manually do cleanup by reviewing all dim/local/global statements and doing searches on every variable to see if they are being used. Thanks.If you're using full SciTe - Put this at the top:#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Shark007 Posted June 17, 2009 Share Posted June 17, 2009 (edited) I'm a relative noob when it comes to AutoIt scripting. My original script is almost 1300 lines which I stripped down to what is posted here so that I could demonstrate the error. I do not yet have the skills to solve this issue on my own. Is there anything I could do to sidestep this error from manifesting itself during obfuscation? EDIT: Just saw the post from SmOke_N... will try it. Nope, adding SmOke_N suggestion to the script caused multiple errors. Edited June 17, 2009 by Shark007 Link to comment Share on other sites More sharing options...
wraithdu Posted June 17, 2009 Share Posted June 17, 2009 (edited) @Shark007 No. Did you read the post linked by KaFu? Obfuscator cannot obfuscate a Call() to a function in a variable. There is no way for Obfuscator to know what the name of the function is at runtime. It still works when compiled because the variable / array is valid, and presumably the string translates correctly during runtime to the function name. This will likely not always be the case. You'll have to live with the error during obfuscation. Edited June 17, 2009 by wraithdu Link to comment Share on other sites More sharing options...
terminatorn Posted June 17, 2009 Share Posted June 17, 2009 (edited) bug: #Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/Convert_Strings=0 /Convert_Numerics=1 /showconsoleinfo=1 /Beta #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** $ni = Execute("1+1") MsgBox(0, "", $ni) Essayez de compiler ce script avec options. Si on fait juste Obfuscator cela donne: global $A6100204D51=A6100000434($Os[0x1]) $A2400105442 = Execute("1+1") MsgBox(Number($A6100204D51), "", $A2400105442) Obfuscator utilise la fonction A6100000434() qui n'existe pas .... hum BUG ! Edited June 17, 2009 by terminatorn Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 18, 2009 Moderators Share Posted June 18, 2009 terminatorn,Il n'y a pas de bug.Obfuscator te previens que tu risques avoir un probleme parcequ'il y a un statement "Execute" - c'est normal. Mais si tu continue, la compilation passe sans probleme et le fichier executable marche parfaitement.Le script apres compilation n'est pas pour les yeux des humains - c'est le principe d'Obfuscation de rendre le script quasiment illisible!M23Trans:There is no bug.Obfuscator warns you of a possible problem because of the "Execute" statement - this is normal. But if you ignore this, the compile process completes without problems and the .exe works perfectly.The obfuscated script is not for human eyes - the whole point of Obfuscator is to render the script unreadable! Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JohnMC Posted June 21, 2009 Share Posted June 21, 2009 (edited) im a little confused, i have variables that i need to prevent from being removed but i dont understand how, and i thought that #Obfuscator_Off would do the trick for the section of variables, but it prevents the section from being included, instead of just including it "as is"update: could i be seeing a bug? when i look at the _Obfuscated source i still has the #Obfuscator_Off and #Obfuscator_On directives shown, and the code in the middle was infact included, but still obfuscated Edited June 21, 2009 by JohnMC https://johnscs.com Link to comment Share on other sites More sharing options...
Developers Jos Posted June 22, 2009 Author Developers Share Posted June 22, 2009 im a little confused, i have variables that i need to prevent from being removed but i dont understand how, and i thought that #Obfuscator_Off would do the trick for the section of variables, but it prevents the section from being included, instead of just including it "as is"update: could i be seeing a bug? when i look at the _Obfuscated source i still has the #Obfuscator_Off and #Obfuscator_On directives shown, and the code in the middle was infact included, but still obfuscatedShow me a example short scriptlet that shows what you mean.Also indicate the used Obfuscator version.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...
JohnMC Posted June 23, 2009 Share Posted June 23, 2009 Show me a example short scriptlet that shows what you mean. Also indicate the used Obfuscator version. Jos #Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/striponly #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** ;Obfuscator 1.0.26.13 #Obfuscator_off Global $OPTION_1_SHORT="HOST" Global $OPTION_HOST="" Global $OPTION_2_SHORT="PORT" Global $OPTION_PORT="5500" #Obfuscator_on msgbox(0,"Test",Eval("OPTION_PORT")) produces: #Obfuscator_off #Obfuscator_on msgbox(0,"Test",Eval("OPTION_PORT")) i know this example doesnt explain why im using eval, but id rather make the compiler work for what i need then re structure my program, i hope im not just being a noob here, sorry if i am https://johnscs.com Link to comment Share on other sites More sharing options...
Developers Jos Posted June 23, 2009 Author Developers Share Posted June 23, 2009 (edited) I understand why this examples doesn't work, but am wondering why you are putting the #Obfuscator_off & #Obfuscator_on in there.Take them out and you will see it works perfectly.This is what is happening: The lines between #Obfuscator_off/on are not processed thus the variables in there are not put into the available Variables table. Then when the Eval() statement is encounter, obfuscator checks the table for variable $OPTION_PORT which isn't in the table and thus they are all stripped.I understand that one could expect that the stripping is not performed between the #Obfuscator_off/on and will see if that should be changed, but these directives were introduced to stop Obfuscator to "translate/obfuscate" these lines.EDIT: Uploaded a new Obfuscator version to the Beta download area which will skip stripping any line between these directives. Jos Edited June 23, 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...
JohnMC Posted June 23, 2009 Share Posted June 23, 2009 I understand why this examples doesn't work, but am wondering why you are putting the #Obfuscator_off & #Obfuscator_on in there.Take them out and you will see it works perfectly.This is what is happening: The lines between #Obfuscator_off/on are not processed thus the variables in there are not put into the available Variables table. Then when the Eval() statement is encounter, obfuscator checks the table for variable $OPTION_PORT which isn't in the table and thus they are all stripped.I understand that one could expect that the stripping is not performed between the #Obfuscator_off/on and will see if that should be changed, but these directives were introduced to stop Obfuscator to "translate/obfuscate" these lines.EDIT: Uploaded a new Obfuscator version to the Beta download area which will skip stripping any line between these directives. Josvery awesome, it would of been tough to explain my real use of eval, but basicly the obfuscator wouldnt of had anyway to get a variable because the variable string was variables that were initialized at runtime, this is great! thankyou very much! https://johnscs.com Link to comment Share on other sites More sharing options...
GameIDevelp Posted June 28, 2009 Share Posted June 28, 2009 I start testing and me Obfuscator so I am newbie .. I start a exemple with this code .... expandcollapse popup#include <GuiConstants.au3> ; GUI GuiCreate("Sample GUI", 400, 400) GuiSetIcon(@SystemDir & "\mspaint.exe", 0) ; MENU GuiCtrlCreateMenu("Menu&One") GuiCtrlCreateMenu("Menu&Two") GuiCtrlCreateMenu("MenuTh&ree") GuiCtrlCreateMenu("Menu&Four") ; CONTEXT MENU $contextMenu = GuiCtrlCreateContextMenu() GuiCtrlCreateMenuItem("Context Menu", $contextMenu) GuiCtrlCreateMenuItem("", $contextMenu);separator GuiCtrlCreateMenuItem("&Properties", $contextMenu) ; PIC GuiCtrlCreatePic("logo4.gif",0,0, 169,68) GuiCtrlCreateLabel("Sample pic", 75, 1, 53, 15) GuiCtrlSetColor(-1,0xffffff) ; AVI GuiCtrlCreateAvi("sampleAVI.avi",0, 180, 10, 32, 32, $ACS_AUTOPLAY) GuiCtrlCreateLabel("Sample avi", 170, 50) ; TAB GuiCtrlCreateTab(240, 0, 150, 70) GuiCtrlCreateTabItem("One") GuiCtrlCreateLabel("Sample Tab with tabItems", 250, 40) GuiCtrlCreateTabItem("Two") GuiCtrlCreateTabItem("Three") GuiCtrlCreateTabItem("") ; COMBO GuiCtrlCreatecombo("Sample Combo", 250, 80, 120, 100) ; PROGRESS GuiCtrlCreateProgress(60, 80, 150, 20) GuiCtrlSetData(-1, 60) GuiCtrlCreateLabel("Progress:", 5, 82) ; EDIT GuiCtrlCreateEdit(@CRLF & " Sample Edit Control", 10, 110, 150, 70) ; LIST GuiCtrlCreateList("", 5, 190, 100, 90) GuiCtrlSetData(-1, "a.Sample|b.List|c.Control|d.Here", "b.List") ; ICON GuiCtrlCreateIcon("shell32.dll", 1, 175, 120) GuiCtrlCreateLabel("Icon", 180, 160, 50, 20) ; LIST VIEW $listView = GuiCtrlCreateListView("Sample|ListView|", 110, 190, 110, 80) GuiCtrlCreateListViewItem("A|One", $listView) GuiCtrlCreateListViewItem("B|Two", $listView) GuiCtrlCreateListViewItem("C|Three", $listView) ; GROUP WITH RADIO BUTTONS GuiCtrlCreateGroup("Sample Group", 230, 120) GuiCtrlCreateRadio("Radio One", 250, 140, 80) GuiCtrlSetState(-1, $GUI_CHECKED) GuiCtrlCreateRadio("Radio Two", 250, 165, 80) GUICtrlCreateGroup ("",-99,-99,1,1) ;close group ; UPDOWN GuiCtrlCreateLabel("UpDown", 350, 115) GuiCtrlCreateInput("42", 350, 130, 40, 20) GuiCtrlCreateUpDown(-1) ; LABEL GuiCtrlCreateLabel("Green" & @CRLF & "Label", 350, 165, 40, 40) GuiCtrlSetBkColor(-1, 0x00FF00) ; SLIDER GuiCtrlCreateLabel("Slider:", 235, 215) GuiCtrlCreateSlider(270, 210, 120, 30) GuiCtrlSetData(-1, 30) ; INPUT GuiCtrlCreateInput("Sample Input Box", 235, 255, 130, 20) ; DATE GuiCtrlCreateDate("", 5, 280, 200, 20) GuiCtrlCreateLabel("(Date control expands into a calendar)", 10, 305, 200, 20) ; BUTTON GuiCtrlCreateButton("Sample Button", 10, 330, 100, 30) ; CHECKBOX GuiCtrlCreateCheckbox("Checkbox", 130, 335, 80, 20) GuiCtrlSetState(-1, $GUI_CHECKED) ; TREEVIEW ONE $treeOne = GuiCtrlCreateTreeView(210, 290, 80, 80) $treeItem = GuiCtrlCreateTreeViewItem("TreeView", $treeOne) GuiCtrlCreateTreeViewItem("Item1", $treeItem) GuiCtrlCreateTreeViewItem("Item2", $treeItem) GuiCtrlCreateTreeViewItem("Foo", -1) GuiCtrlSetState($treeItem, $GUI_EXPAND) ; TREEVIEW TWO $treeTwo = GuiCtrlCreateTreeView(295, 290, 103, 80, $TVS_CHECKBOXES) GuiCtrlCreateTreeViewItem("TreeView", $treeTwo) GuiCtrlCreateTreeViewItem("With", $treeTwo) GuiCtrlCreateTreeViewItem("tvs_checkboxes", $treeTwo) GuiCtrlSetState(-1, $GUI_CHECKED) GuiCtrlCreateTreeViewItem("Style", $treeTwo) ; GUI MESSAGE LOOP GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE WEnd But the uotput Line I have "Can't open file c:\Documents and Settings\more\Desktop\" and can not obfucate the code .. where i mistake .? And for another code that worck to obfuscate , when i compile to exe ,, and execute the exe she get me a Global$ var error and not worck the Program ..... Link to comment Share on other sites More sharing options...
Developers Jos Posted June 28, 2009 Author Developers Share Posted June 28, 2009 I start testing and me Obfuscator so I am newbie .. I start a exemple with this code .... But the uotput Line I have "Can't open file c:\Documents and Settings\more\Desktop\" and can not obfucate the code .. where i mistake .?And for another code that worck to obfuscate , when i compile to exe ,, and execute the exe she get me a Global$ var error and not worck the Program .....There are errors in this code. first test it by running it and make sure its error free before trying to Obfuscate it.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...
Recommended Posts