Jump to content

Need help to protect script


Recommended Posts

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.

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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)
EndFunc

From: http://www.autoitscript.com/forum/index.ph...19370&st=60

Edited by sensalim
Link to comment
Share on other sites

Try looking in this post:

http://www.autoitscript.com/forum/index.ph...43&hl=hhash

I 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
EndIf

Regards

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...