sensalim Posted April 22, 2008 Posted April 22, 2008 I only need a simple way (or idea) on how to protect a script (compiled to exe). I want to avoid a 'client' giving the script away to his/her friends. This 'client' will not be a programmer or any kind of computer engineer. This 'client' will be salesperson. They won't know much about registry. So any idea? Thanks.
Vindicator209 Posted April 22, 2008 Posted April 22, 2008 I had to tackle this on multiple occasions, I believe the best way is to create a separte program to write a key in the registry, then delete itself, the mainprogram will always check for the key and will exit if it is not found. thats the EASY way... theres a bunch of stuff involving the confirmation of IPs, or downloading and checking a file from a host, and alot of junk like that [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]
sensalim Posted April 22, 2008 Author Posted April 22, 2008 Hm yes. How do a script "delete itself"? The process is still in memory so it can't just delete the exe, right?
sensalim Posted April 22, 2008 Author Posted April 22, 2008 (edited) Found it.Func _SelfDelete($iDelay = 0) Local $sCmdFile FileDelete(@TempDir & "\scratch.bat") $sCmdFile = 'ping -n ' & $iDelay & '127.0.0.1 > nul' & @CRLF _ & ':loop' & @CRLF _ & 'del "' & @ScriptFullPath & '"' & @CRLF _ & 'if exist "' & @ScriptFullPath & '" goto loop' & @CRLF _ & 'del ' & @TempDir & '\scratch.bat' FileWrite(@TempDir & "\scratch.bat", $sCmdFile) Run(@TempDir & "\scratch.bat", @TempDir, @SW_HIDE) EndFuncFrom: http://www.autoitscript.com/forum/index.ph...19370&st=60 Edited April 22, 2008 by sensalim
Valuater Posted April 22, 2008 Posted April 22, 2008 XProTec.au3 might helphttp://www.autoitscript.com/forum/index.ph...st&p=2220958)
newbiescripter Posted April 22, 2008 Posted April 22, 2008 Try looking in this post:http://www.autoitscript.com/forum/index.ph...43&hl=hhashI used it and it works great.there is just one error, and thats is when the client is for example deletes the MD5Hash.dll then the hardware-hash would allways be the same as you compare with.but you can fix it by adding the following lines in the top of your script:If FileExists(@ScriptDir & "\MD5Hash.dll") = 0 Then Exit 0 EndIfRegards
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