J0rdan Posted June 17, 2010 Share Posted June 17, 2010 Hey guys, I'm having a bit of a problem with a group taking credit for my (and my friend's) script. Now, I know that there is no way to properly protect an AU3, but I don't need one. The group is merely decompiling the exe, and changing the text. They clearly aren't familiar with AutoIt, as they aren't removing certain things which they would have should they know how to. So, are there any obfuscaters out there that change text ("")?. Thanks in advance, Jordan. Link to comment Share on other sites More sharing options...
GerrOrneq Posted June 17, 2010 Share Posted June 17, 2010 Hi, A simple answer to the problem is to Not store your text strings as plain text. Instead you could write a script to convert your strings to Hex and paste those hex strings into your code, then when you need to display the text just reverse the process from Hex to plain text characters. If you want you could run it through ROT13 or similar first to obscure it even more. i.e. Plain text > ROT13 > Hex e.g. Text = "Hello", converted to ROT13 = "Uryyb", Converted to Hex = 55 72 79 79 62 Now just store the Hex in your script and it will not make sense to the people decompiling and even if they recognise Hex it will still only give them gibberish unless they also recognise ROT13 too. DeMo. Quote of the week:"BASIC programmers never die, they GOSUB and don't RETURN." -- UnknownWisdom of the ages: I'd be unstoppable... if not for law enforcement and physics. Marriage, the number 1 cause of divorce. Don't steal... the government hates competition. Irish Government Motto: We’ve got what it takes to take what you’ve got. Birthdays are good for you. Statistics show that the people who have the most live the longest. Failure is not an option. It comes bundled with your Microsoft product.-- Ferenc Mantfeld If you learn from your mistakes, then why ain't I a genius?! -- Anonymous Remember, live every day as if it was your last day! one day you will be right. How is it one careless match can start a forest fire, but it takes a whole box to start a campfire? Sure my system is secure, it just locked up again. I haven't lost my mind; I have a tape back-up somewhere. ~Author Unknown Link to comment Share on other sites More sharing options...
J0rdan Posted June 17, 2010 Author Share Posted June 17, 2010 Thanks That should work a treat (hopefully) Now for doing that with all the text... Ugh, I'll be back in a week with some more problems Link to comment Share on other sites More sharing options...
sahsanu Posted June 18, 2010 Share Posted June 18, 2010 (edited) I've just wondering how to do it and here what I get: 1.- Create a file with phrase inside. 2.- Calculate the hash of that file (the hash will be our password) 3.- Use that hash to decrypt our previously crypted texts Of course, before (that's the hard work) you need to encrypt all your texts an put them in an array. Well, just an example: #include <Crypt.au3> #include <Array.au3> ; Include not needed, used only to display the examples ;Variable $sInside is just a simple text, needed to create the content of the file. I've done it with Chr() just ;to obfuscate it a little ;) $sInside = Chr(84) & Chr(104) & Chr(105) & Chr(115) & Chr(32) & Chr(105) & Chr(115) & Chr(32) & _ Chr(116) & Chr(104) & Chr(101) & Chr(32) & Chr(116) & Chr(101) & Chr(120) & Chr(116) & Chr(32) & _ Chr(105) & Chr(110) & Chr(115) & Chr(105) & Chr(100) & Chr(101) & Chr(32) & Chr(116) & Chr(104) & _ Chr(101) & Chr(32) & Chr(102) & Chr(105) & Chr(108) & Chr(101) $sRandonFileNumber = Random(1100000,1200000) ; Here a random file number to create a temporal file $fOurFileForHash=FileOpen(@TempDir & "\" & $sRandonFileNumber & ".dat",2) ; Open tha temporal file in write mode FileWrite($fOurFileForHash, $sInside) ; Introduce the text in the file FileClose($fOurFileForHash) $sHash=_Crypt_HashFile(@TempDir & "\" & $sRandonFileNumber & ".dat",$CALG_SHA1) ; Calculate the hash of our temporal file, it will be the pass to decrypt the texts FileDelete(@TempDir & "\" & $sRandonFileNumber & ".dat") ; Delete the temporal file Global $ProgramTexts[4] ; Here are our string texts, you should encrypt them before and the write them in an array like this $ProgramTexts[0]="0xA714B2604F359BDDC67586B5599A8FCDA9615727F4A5BAAE2CD31A63B506B5C7" $ProgramTexts[1]="0x20D9D39889607D16BEAE6D1A031E6AE9B63625644F1441035B5E22B7E09F0AB042C0E63B7D3D4DD955974FAFFD0FB9CF2F90B18FC5BEC9EBC043C60077EEF80B" $ProgramTexts[2]="0x742384889F531A94FAE59ED4D4FCB05CEEE2D3CA551E0340E9CB4715A039E93B4F50338175EE0CEF3FA01DED6FD21681" $ProgramTexts[3]="0x093580EF919160BA9FCE54C3A2B0445C09829DC87DDF350063241F08B5152F64" _ArrayDisplay($ProgramTexts) ; These are the texts without the pass For $i=0 To UBound($ProgramTexts)-1 $ProgramTexts[$i]=BinaryToString(_Crypt_DecryptData($ProgramTexts[$i],$sHash,$CALG_AES_256)) ; With this loop all text strings are decrypted Next _ArrayDisplay($ProgramTexts) ; These are the converted texts This is the way I encrypted the texts: #include <Crypt.au3> $sInside = "This is the text inside the file" $sRandonFileNumber = Random(1100000,1200000) $fOurFileForHash=FileOpen(@TempDir & "\" & $sRandonFileNumber & ".dat",2) FileWrite($fOurFileForHash, $sInside) FileClose($fOurFileForHash) $sHash=_Crypt_HashFile(@TempDir & "\" & $sRandonFileNumber & ".dat",$CALG_SHA1) FileDelete(@TempDir & "\" & $sRandonFileNumber & ".dat") Global $texts[4] $texts[0] = "This is my first text" $texts[1] = "I'm trying to avoid that you can change my program easily" $texts[2] = "Visit my webpage for original program" $texts[3] = "Finishing this example" For $i=0 To Ubound($texts)-1 ConsoleWrite($i+1 & ": " & $texts[$i] & @CRLF & $i+1 & ": " & _Crypt_EncryptData($texts[$i],$sHash,$CALG_AES_256) & @CRLF) Next And finishing... if you want to "obfuscate" the text with Chr() function just like I did for $sInside variable, here an example: Local $a = StringToASCIIArray("This is the text inside the file") ; Change the phrase For $i=0 To UBound($a)-1 If $i=UBound($a)-1 Then ConsoleWrite("Chr(" & $a[$i] & ")") Else ConsoleWrite("Chr(" & $a[$i] & ") & ") EndIf Next I don't know whether this could be useful for you or for anyone but was funny to play with it Edit: I forgot to mention that you should run Obfuscator (select it in Scite options) too when you compile you program, obfuscator as well will "hide" your text. Cheers, sahsanu Edited June 18, 2010 by sahsanu Link to comment Share on other sites More sharing options...
MvGulik Posted June 18, 2010 Share Posted June 18, 2010 (edited) whatever Edited February 7, 2011 by MvGulik "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...
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