Moderators SmOke_N Posted April 10, 2007 Moderators Share Posted April 10, 2007 Hi,yes I agree with you. But I'd prefer to have an option to exclude code from stripping or obfuscating. Something like a warning. --> This code is obfuscated and written by ... Or you cracked the exe, but know have fun with this hardly readable code! :-)Maybe the easiest way would be a keyword for the obfuscator start at this line #obfuscatorOn# so that I can put readable information on top of the script.Same thing with lines in the code, (comments no really Autoit code), but is nice to have! :-)So, what do you think?So long,MegaI've been following this thread for obvious reasons. This request totally defeats the purpose IMO.1. To partially obfuscate a script, makes it that much easier for the person that has taken the time to look at your source, to actually decipher it. So why even obfuscate it to begin with.2. Taunting someone isn't going to do anything but make them a tad more determined to break down your code.3. Despite what many of you may think, because the code is "functional" it still makes it easy to understand for those of you/us that know what is going on within the code itself. Just because a function name or variables are not in plain English (or any native tongue) doesn't mean that we can't follow the code.The attempt with obfuscation, is to simply frustrate the person that has taken the time to look at the source... A hope that they won't continue on any further.Another suggestion, just because this is being written by Jdeb, it isn't going to change the fundamentals that you as the end coder has to do in order to have a proper running obfuscated script/exe. The "coding" habits that I referred to in EnCodeIt are still going to apply in this case as well... Anything else written to avoid that, in my opinion (since it's be provided at no charge), is more of Jdebs time than it is worth, when you the coder should be practicing good coding habits naturally anyway.You guys should be helping to perfect what is currently implemented, rather than adding things that have no relevance to "obfuscation".My .02 cents.Good job Jos... Take care all. 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...
Xenobiologist Posted April 10, 2007 Share Posted April 10, 2007 Hi Ron,nice to see you back, but I cannot follow you. IMO my suggestion do not defeat the purpose of obfuscation. There is not always black and white. Sometimes there are more soltions. There is no problem for me, to copy the header back to the script after obfuscation, but I keep the standpoint that having such an option will be +. (mentioned above)So long,MegaYou guys should be helping to perfect what is currently implemented, rather than adding things that have no relevance to "obfuscation".All I did - is my try to help to make the concept and script of Jos better! Even if my suggestions do not fit your thoughts! Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Developers Jos Posted April 10, 2007 Author Developers Share Posted April 10, 2007 I've been following this thread for obvious reasons. This request totally defeats the purpose IMO.1. To partially obfuscate a script, makes it that much easier for the person that has taken the time to look at your source, to actually decipher it. So why even obfuscate it to begin with.2. Taunting someone isn't going to do anything but make them a tad more determined to break down your code.3. Despite what many of you may think, because the code is "functional" it still makes it easy to understand for those of you/us that know what is going on within the code itself. Just because a function name or variables are not in plain English (or any native tongue) doesn't mean that we can't follow the code.The attempt with obfuscation, is to simply frustrate the person that has taken the time to look at the source... A hope that they won't continue on any further.I will support the #Obfuscator_Off & #Obfuscator_On if only to have the option to skip processing a portion of the input file, for whatever reason somebody needs might have (and its easy to implement), but totally agree that whatever you do ... it code remains kinda readable, only more difficult. It is still not safe to containing Passwords etc. Another suggestion, just because this is being written by Jdeb, it isn't going to change the fundamentals that you as the end coder has to do in order to have a proper running obfuscated script/exe. The "coding" habits that I referred to in EnCodeIt are still going to apply in this case as well... Anything else written to avoid that, in my opinion (since it's be provided at no charge), is more of Jdebs time than it is worth, when you the coder should be practicing good coding habits naturally anyway.True, most restrictions mentioned by you are also valid for this Obfuscator, some are resolved.Where did I say its going to be free when finished ? Good job Jos... Take care all.Thank you for pointing me in the right direction for the string encryption... 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...
Moderators SmOke_N Posted April 10, 2007 Moderators Share Posted April 10, 2007 (edited) Hi Ron,nice to see you back, but I cannot follow you. IMO my suggestion do not defeat the purpose of obfuscation. There is not always black and white. Sometimes there are more soltions. There is no problem for me, to copy the header back to the script after obfuscation, but I keep the standpoint that having such an option will be +. (mentioned above)So long,MegaYou guys should be helping to perfect what is currently implemented, rather than adding things that have no relevance to "obfuscation".All I did - is my try to help to make the concept and script of Jos better! Even if my suggestions do not fit your thoughts!Well, I'm not going to hijack this thread (Like he did mine (j/k Jos)) ...Point:http://www.google.com/search?q=define%3Aob...=utf-8&aq=thttp://en.wikipedia.org/wiki/Obfuscated_codeObfuscation is meant to make it "hard" to understand code, your suggestion of a header or comments doesn't follow in line with this at all.In this case (obfuscation), it is "black and white".This is the last I'll speak on the issue, but you are more than welcome to continue.Edit:You're puppy Jos... Run with it ... I see you will implement it, but that kind of thing should come with a warning label Edited April 10, 2007 by SmOke_N 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...
Xenobiologist Posted April 10, 2007 Share Posted April 10, 2007 Edit: With the AutoIt3Wrapper integration, the directives are read and use on the obfuscated compiled version, so they are not needed in the obfuscated source.Hi Jos,I do not understand that sentence. If I obfuscate the au3 in Scite with your great tool, then the #Region Compiler directives section...#EndRegionwill be erased. When I compile the code without putting the things back on top the special directives are lost.So long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Developers Jos Posted April 10, 2007 Author Developers Share Posted April 10, 2007 Hi Jos,I do not understand that sentence. If I obfuscate the au3 in Scite with your great tool, then the #Region Compiler directives section...#EndRegionwill be erased. When I compile the code without putting the things back on top the special directives are lost.So long,MegaTrue, but think of it this way:You are coding your script that's called XYZ.au3 and you are ready to Compile it, thus you hit F7 and go into "sit back and relax" mode.AutoIt3Wrapper kicks of and will:1. Read all directives from the xyz.au3 source and start performing, as requested, the Compile section. 2. Run Any #Compiler_Run_Before defined programs.3. Run au3check against the xyz.au3 inputfile to make sure the original is correct.4. Run Obfuscator with xyz.au3 as input and xyz_obfuscated.au3 as output.5. Run au3check on xyz_obfuscated.au3 just to make sure Obfuscator didn't Screw up anything in the syntax.6. Check if Resource info needs to be changed in the target program and if so run RC.exe and Reshacker.7. Run Aut2EXE with xyz_obfuscated.au3 as input but creating xyz.exe (unless a compiler directive tells it otherwise)8. Run CvsWrapper if requested.9. Run Any #Compiler_Run_After defined programsSo you see we don't need the compiler directives once I am done with the whole thing. 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...
Xenobiologist Posted April 10, 2007 Share Posted April 10, 2007 Hi, ahhh I see. When you are done with it, I can still use them and they will be recognized but erased from the script itself. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Developers Jos Posted April 10, 2007 Author Developers Share Posted April 10, 2007 Uploaded new version that has these changes:v0.0.0.31:Change String encrypt/decrypt logic to speed up the decryption process. Thanks Smoke_N for the pointing me in the right direction. Removed the "/Convert_Strings 2" option (obsolete).Fixed Conversion of COM Commands that look like UDF. They are now skipped. (tnx th.meger) Added #Obfuscator_Off & #Obfuscator_On to skip obfuscation of parts of the Source. Comments won't be stripped in this section either. (tnx th.meger) Leave #forceref statements in obfuscated source to avoid au3check errors. 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...
Dickb Posted April 10, 2007 Share Posted April 10, 2007 Hi JdeB, thanks for a great program. This is the first obfuscator that realy works with my more complex scripts. One little thing that goes wrong, it removes the "#Compiler_PlugIn_Funcs=" line and that is what is use in a number of scripts. To be more precise, I use #Compiler_PlugIn_Funcs=FormatPrep,FormatTrack,FormatClose for a plugin that I wrote to format diskettes. Not really a problem, but maybe that you can leave this line in too. Thanks again, Dick Link to comment Share on other sites More sharing options...
Blackstar Posted April 10, 2007 Share Posted April 10, 2007 Thanks JdeB Link to comment Share on other sites More sharing options...
Developers Jos Posted April 10, 2007 Author Developers Share Posted April 10, 2007 (edited) One little thing that goes wrong, it removes the "#Compiler_PlugIn_Funcs=" line and that is what is use in a number of scripts.To be more precise, I use #Compiler_PlugIn_Funcs=FormatPrep,FormatTrack,FormatClosefor a plugin that I wrote to format diskettes.Not really a problem, but maybe that you can leave this line in too.Will have a look at this ... shouldn't be too difficult EDIT: added to v0.0.0.32 Edited April 10, 2007 by JdeB 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...
Xenobiologist Posted April 11, 2007 Share Posted April 11, 2007 (edited) Hi, always getting better and better! 1. The #Region Compiler directives section ist still be erased even if in #Obfuscator_Off mode. 2. The new filename = oldfilname_Obfuscated could be a obfuscator directive 3. If not it should be written the way the original file was named. (case sensitive) 4. The Global Const section is always on top of the script even if the first statement is #Obfuscator_Off. If possible would be nice to add them after the first #Obfuscator_On. Thanks! So long, Mega Edited April 11, 2007 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
NELyon Posted April 11, 2007 Share Posted April 11, 2007 *chuckles* Would you like Fries and a drink with that?Ugh, how many times must we catch you creeping out of your hole called "Chat"? Link to comment Share on other sites More sharing options...
Blackstar Posted April 11, 2007 Share Posted April 11, 2007 (edited) Ok i have "Execute" line near bottom in this code: Case $s_property = "vcard" Local $aVcard[1][29] $aVcard[0][0] = "Business.City" $aVcard[0][1] = "Business.Country" $aVcard[0][2] = "Business.Fax" $aVcard[0][3] = "Business.Phone" $aVcard[0][4] = "Business.State" $aVcard[0][5] = "Business.StreetAddress" $aVcard[0][6] = "Business.URL" $aVcard[0][7] = "Business.Zipcode" $aVcard[0][8] = "Cellular" $aVcard[0][9] = "Company" $aVcard[0][10] = "Department" $aVcard[0][11] = "DisplayName" $aVcard[0][12] = "Email" $aVcard[0][13] = "FirstName" $aVcard[0][14] = "Gender" $aVcard[0][15] = "Home.City" $aVcard[0][16] = "Home.Country" $aVcard[0][17] = "Home.Fax" $aVcard[0][18] = "Home.Phone" $aVcard[0][19] = "Home.State" $aVcard[0][20] = "Home.StreetAddress" $aVcard[0][21] = "Home.Zipcode" $aVcard[0][22] = "Homepage" $aVcard[0][23] = "JobTitle" $aVcard[0][24] = "LastName" $aVcard[0][25] = "MiddleName" $aVcard[0][26] = "Notes" $aVcard[0][27] = "Office" $aVcard[0][28] = "Pager" For $i = 0 To 28 $aVcard[1][$i] = Execute('$o_object.document.parentwindow.top.navigator.userProfile.getAttribute("' & $aVcard[0][$i] & '")') Next SetError($_IEStatus_Success) Return $aVcard and did obfuscated the script that resulted in crash after running it in compiled exe file. Is there a work-around without using Execute line? Edited April 11, 2007 by Blackstar Link to comment Share on other sites More sharing options...
Developers Jos Posted April 11, 2007 Author Developers Share Posted April 11, 2007 (edited) Hi,always getting better and better! 1. The #Region Compiler directives section ist still be erased even if in #Obfuscator_Off mode. 2. The new filename = oldfilname_Obfuscated could be a obfuscator directive3. If not it should be written the way the original file was named. (case sensitive)4. The Global Const section is always on top of the script even if the first statement is #Obfuscator_Off. If possible would be nice to add them after the first #Obfuscator_On.Thanks!So long,Mega1. The latest version does already do this to my knowledge. 2. Discussed before and its going to stay as is unless i can see a real use for this.3. will be changed in the next version.4. will always be at the top to avoid massive problems with Variable being defined too late. Thanks for your feedback, Edited April 11, 2007 by JdeB 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...
Developers Jos Posted April 11, 2007 Author Developers Share Posted April 11, 2007 (edited) Ok i have "Execute" line near bottom in this code: Case $s_property = "vcard" Local $aVcard[1][29] $aVcard[0][0] = "Business.City" $aVcard[0][1] = "Business.Country" $aVcard[0][2] = "Business.Fax" $aVcard[0][3] = "Business.Phone" $aVcard[0][4] = "Business.State" $aVcard[0][5] = "Business.StreetAddress" $aVcard[0][6] = "Business.URL" $aVcard[0][7] = "Business.Zipcode" $aVcard[0][8] = "Cellular" $aVcard[0][9] = "Company" $aVcard[0][10] = "Department" $aVcard[0][11] = "DisplayName" $aVcard[0][12] = "Email" $aVcard[0][13] = "FirstName" $aVcard[0][14] = "Gender" $aVcard[0][15] = "Home.City" $aVcard[0][16] = "Home.Country" $aVcard[0][17] = "Home.Fax" $aVcard[0][18] = "Home.Phone" $aVcard[0][19] = "Home.State" $aVcard[0][20] = "Home.StreetAddress" $aVcard[0][21] = "Home.Zipcode" $aVcard[0][22] = "Homepage" $aVcard[0][23] = "JobTitle" $aVcard[0][24] = "LastName" $aVcard[0][25] = "MiddleName" $aVcard[0][26] = "Notes" $aVcard[0][27] = "Office" $aVcard[0][28] = "Pager" For $i = 0 To 28 $aVcard[1][$i] = Execute('$o_object.document.parentwindow.top.navigator.userProfile.getAttribute("' & $aVcard[0][$i] & '")') Next SetError($_IEStatus_Success) Return $aVcard and did obfuscated the script that resulted in crash after running it in compiled exe file. Is there a work-around without using Execute line?Warnings are given during Obfuscation and shouldn't be ignored: -> ### Obfuscation Warning: Found Execute() statement which could lead to problems running your obfuscated script. -> ### current Func:Main Script test.au3(34,1) Warning for line:$aVcard[1][$i] = Execute('$o_object.document.parentwindow.top.navigator.userProfile.getAttribute("' & $aVcard[0][$i] & '")') I have no idea what this piece of code is supposed to do and it doesn't run as is ... but have doubts that you need the Execute here anyways as the code looks pretty strait forward. If you want to know then start a separate thread in support to see if people can help you to get rid of the execute. Edited April 11, 2007 by JdeB 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...
Xenobiologist Posted April 11, 2007 Share Posted April 11, 2007 (edited) 1. The latest version does already do this to my knowledge. 2. Discussed before and its going to stay as is unless i can see a real use for this.3. will be changed in the next version.4. will always be at the top to avoid massive problems with Variable being defined too late. Thanks for your feedback,HI,1. Yes, it works!2. I'll think about it. :-)3. Okay, thanks!4. Then it is a user problem not the problem of your script, but it is okay the way it is. That is why I mentioned a #Obfuscator_Code or start directive. Your script will not effect any code written above and will place its code right beyond it. What comes up, if I obfuscate an already obfuscated script? It builds a new crypt-the-strings func. There a kind of random in it, right? So it will not be more secure or maybe harder to backtrack if I can give an iteration with it like in _StringEncrypt, right? It stays the same, only other strings.Edit: Another little thing. The func to convert the strings is written func instead of Func and endfunc in lieu of Endfunc. I assume, that everybody uses Tidy that is why every Func is written with a capital F. If you can change this, your func will not be that easy to identify. So long,MegaP.S.: Yes, I know I am a pain in the neck, but I only try to help with some suggestions. Edited April 11, 2007 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Developers Jos Posted April 11, 2007 Author Developers Share Posted April 11, 2007 What comes up, if I obfuscate an already obfuscated script? It builds a new crypt-the-strings func. There a kind of random in it, right? So it will not be more secure or maybe harder to backtrack if I can give an iteration with it like in _StringEncrypt, right? It stays the same, only other strings.It will rename all vars and func again and the String variables at the to will be "bigger" with a double translation.It is correct that it doesn't make it any more safe than running it one time.Edit: Another little thing. The func to convert the strings is written func instead of Func and endfunc in lieu of Endfunc. I assume, that everybody uses Tidy that is why every Func is written with a capital F. If you can change this, your func will not be that easy to identify. I am not kidding myself... That will not be the give-away. the Func name will be the thing that is searched for first.I think you need to stop looking at the formatting of the obfuscated script. it should look messy, the more the better. P.S.: Yes, I know I am a pain in the neck, but I only try to help with some suggestions.I know and welcome your comments... I will simply say No when I don't like them, its all in the game. I do get the impression however that we are nearing the end of Beta stage seeing the last number of posts... only nice-to-haves and no real issues/problems anymore ... 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...
Xenobiologist Posted April 11, 2007 Share Posted April 11, 2007 (edited) Hi, yes it getting done ... Just another thought :"> It will help a little bit to get it more messy to convert int like this: ;MsgBox(16, 'Test', 'Test', 4) ; normal MsgBox(Execute(Chr(49)&chr(54)), 'Test', 'Test', Chr(52)) ; ; first step ; obfuscated Global Const $SA372E48401A163154=A3632E53522E5F2("54657374"),$SA27623292A5E5A3C=A3632E53522E5F2("54657374") MsgBox(Execute(Chr(49)&chr(54)), $SA372E48401A163154, $SA27623292A5E5A3C, Chr(52)) ; like it should be :-) func A3632E53522E5F2($A3632E53522E5F2) Local $A3632E53522E5F22 For $x = 1 to StringLen($A3632E53522E5F2) step 2 $A3632E53522E5F22 &= Chr(Dec(StringMid($A3632E53522E5F2,$x,2))) Next Return $A3632E53522E5F22 endfunc So long, Mega Edited April 11, 2007 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 11, 2007 Share Posted April 11, 2007 Hi, and anonther one. You can make an UnTidy script. Something like: ; UnTidy #include<Array.au3> #include<File.au3> Global $filePath = @ScriptDir & '\script.au3' Global $path_UntidyScript = @ScriptDir & '\script_Untidy.au3' Global $inhalt = FileRead(FileOpen($filePath, 0)) Global $content_A = StringSplit($inhalt, '') Global $i = 0 Do If StringIsAlpha($content_A[$i]) Then If StringIsUpper($content_A[$i]) Then $content_A[$i] = StringLower($content_A[$i]) Else $content_A[$i] = StringUpper($content_A[$i]) EndIf EndIf $i += Random(1, 2, 1) Until $i >= UBound($content_A) - 1 FileWrite(FileOpen($path_UntidyScript, 2), _ArrayToString($content_A, '', 1)) Not implemented excluding string in '' oder "". :-) Just an example. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Recommended Posts