10.07.2011, 15:47
(
Last edited by Mauzen; 10/07/2011 at 09:31 PM.
)
As I was experimenting a bit with emit today, I remembered a guy named "Y_Less" once said, including specific custom amx code using emit might be a way to stop DeAMX.
So i tried, and it really does. I tried to make the #emit code as short and as useless as possible, and this is the result.
I thought this loads a value from the variable b and instantly stores it back there (but it does not do that actually), but I am not a AMX coder, just had a few looks on it yet. But at least it does what it should do: nothing. And it also turns the DeAMX result to nothing.
How it works: DeAMX tries to reverse the AMX code by looking for certain patterns. But this code does not match these patterns and causes problems, just like the old array-anti-deamx does.
How to use: add the function to your script, and call WasteDeAMXersTime() in some callbacks or in your main()
Why use this: There are DeAMX mods that are able to decompile code with the common array-protection, but there arent any for this yet. Im not saying this is more safe, as it is also easily doable to add an exception to DeAMX to work with this, but the big advantage is that this code is easily modifyable. The upper code should just be an example, if you got some minutes, read a bit about #emit and create your own stable emit-antideamx. This way, the guy who wants to decompile your amx has no idea what kind of protection he faces. At this point, the decompiling attempt for script kiddies is already over: They dont know what tool they should download.
You can also use multiple different ones of these in your source, or combine it with the array-anti-deamx. So anyone who wants to decompile it has to go through it part by part to add exceptions for every single one. And I dont think there are lots of people here who could do that.
So, have fun with this, I hope it helps to protect some scripts against stupid kids.
PS: Just a warning/suggestion: ALWAYS back up your script properly. Especially if you might loose the .pwn and need to "decompile" your amx.
So i tried, and it really does. I tried to make the #emit code as short and as useless as possible, and this is the result.
pawn Code:
WasteDeAMXersTime()
{
new b;
#emit load.pri b
#emit stor.pri b
}
How it works: DeAMX tries to reverse the AMX code by looking for certain patterns. But this code does not match these patterns and causes problems, just like the old array-anti-deamx does.
How to use: add the function to your script, and call WasteDeAMXersTime() in some callbacks or in your main()
pawn Code:
main()
{
// code
WasteDeAMXersTime();
}
public OnGameModeInit()
{
// code
WasteDeAMXersTime();
}
// etc.
You can also use multiple different ones of these in your source, or combine it with the array-anti-deamx. So anyone who wants to decompile it has to go through it part by part to add exceptions for every single one. And I dont think there are lots of people here who could do that.
So, have fun with this, I hope it helps to protect some scripts against stupid kids.
PS: Just a warning/suggestion: ALWAYS back up your script properly. Especially if you might loose the .pwn and need to "decompile" your amx.