epicfail Posted September 7, 2009 Posted September 7, 2009 hello is it better to make a include or use func in my script. is it harder 4 people to read if its a include if some 1 decompiles my script?
GEOSoft Posted September 7, 2009 Posted September 7, 2009 In the long run it won't make any difference. Any code, written in any language can be read if the baddies want to take the time to do it. Don't waste whatever precious time you have on this earth worrying about those little details. People often are living under the mis-conception that their code is so great it must be protected at all costs, when in reality it's probably already been done by someone and that someone may have even done a better job of it. If you want to really confuse them of course you could #include a few extra UDFs that are not required in your code. Amazingly the fools will start to wonder about your sanity in taking such effort for no return value and making your compiled script so large for no practical reason. Concentrate on your code and drop the paranoia, you will enjoy it more that way. I've had a few of my early compiled scripts "stolen" and re-written in another language then released. I have to ask myself why they would want to steal an early release of the code, they could have waited two weeks and stolen a better version. The very fact that it was also freeware made very little sense. I didn't worry about it and in that case I knew who had done it so I made sure that everyone knew that he had plagarized the code and if they wanted a better version they could download my later release or wait until I made a third release that incorporated the one good change that he had made, a proper GUI. 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!"
FireFox Posted September 7, 2009 Posted September 7, 2009 In the long run it won't make any difference. Any code, written in any language can be read if the baddies want to take the time to do it. Don't waste whatever precious time you have on this earth worrying about those little details.People often are living under the mis-conception that their code is so great it must be protected at all costs, when in reality it's probably already been done by someone and that someone may have even done a better job of it.If you want to really confuse them of course you could #include a few extra UDFs that are not required in your code. Amazingly the fools will start to wonder about your sanity in taking such effort for no return value and making your compiled script so large for no practical reason.Concentrate on your code and drop the paranoia, you will enjoy it more that way. I've had a few of my early compiled scripts "stolen" and re-written in another language then released. I have to ask myself why they would want to steal an early release of the code, they could have waited two weeks and stolen a better version. The very fact that it was also freeware made very little sense. I didn't worry about it and in that case I knew who had done it so I made sure that everyone knew that he had plagarized the code and if they wanted a better version they could download my later release or wait until I made a third release that incorporated the one good change that he had made, a proper GUI.Wow ! Cheers, FireFox.
Xenobiologist Posted September 8, 2009 Posted September 8, 2009 The main gist of this thread should be, that it doesn't matter whether it is a func or an include, cause before compilation all it put together to only one peace of of code. I think, the best way to protect your code, is trying to avoid the chance to detect that the exe file is wirtten in Autoit. 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
jvanegmond Posted September 8, 2009 Posted September 8, 2009 (edited) Stop right there. I've seen people code like this, using an include where a function is appropriate:SendMail.au3:#include <INet.au3> $result = _INetMail ( $address, $subject, $text )Mainscript.au3:Dim $address = "test@test.com" Dim $subject = "Bad programming" Dim $text = "Hello, this is a test. Regards, Manadar." #include <SendMail.au3> If ($result > 0) Then MsgBox(0,"","Mail was sent succesfully.") EndIfThis is bad programming and you should never do it. Edited September 8, 2009 by Manadar github.com/jvanegmond
trancexx Posted September 8, 2009 Posted September 8, 2009 Stop right there. I've seen people code like this, using an include where a function is appropriate: SendMail.au3: #include <INet.au3> $result = _INetMail ( $address, $subject, $text ) Mainscript.au3: Dim $address = "test@test.com" Dim $subject = "Bad programming" Dim $text = "Hello, this is a test. Regards, Manadar." #include <SendMail.au3> If ($result > 0) Then MsgBox(0,"","Mail was sent succesfully.") EndIf This is bad programming and you should never do it. I saw it this way (others too apparently): - scenario 1 #include <SendMail.au3> Dim $address = "test@test.com" Dim $subject = "Blah blah" Dim $text = "Hello, this is a test. Regards, Manadar." $result = _SendMail($address, $subject, $text) If ($result > 0) Then MsgBox(0,"","Mail was sent succesfully.") EndIf - scenario 2 Dim $address = "test@test.com" Dim $subject = "Blah blah" Dim $text = "Hello, this is a test. Regards, Manadar." $result = _SendMail($address, $subject, $text) If ($result > 0) Then MsgBox(0,"","Mail was sent succesfully.") EndIf Func _SendMail($address, $subject, $text) ; Function here EndFunc ♡♡♡ . eMyvnE
jvanegmond Posted September 8, 2009 Posted September 8, 2009 (edited) I know other people saw it that way as well. It makes sense to read it like that, because you know how to write valid programming code.I'm just hoping that someone will learn not to program like I described anymore. Even if it's just a random Googler, trying to figure out whether to use a include or a function.Edit: Imagine if epicfail did mean it like how I interpreted it and everyone here told him that it was fine either way. Edited September 8, 2009 by Manadar github.com/jvanegmond
trancexx Posted September 8, 2009 Posted September 8, 2009 I know other people saw it that way as well. It makes sense to read it like that, because you know how to write valid programming code.I'm just hoping that someone will learn not to program like I described anymore. Even if it's just a random Googler, trying to figure out whether to use a include or a function.Edit: Imagine if epicfail did mean it like how I interpreted it and everyone here told him that it was fine either way. Ok, I can live with that explanation this time. Next time you'll be spanked Why are you teaching people to use 'Dim'? ♡♡♡ . eMyvnE
jvanegmond Posted September 8, 2009 Posted September 8, 2009 Ok, I can live with that explanation this time. Next time you'll be spanked Why are you teaching people to use 'Dim'?One step at a time!! In my defence, I like to explicitly declare my variables. Using Local is probably better, though. github.com/jvanegmond
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