Quote:
Originally Posted by Bugsy
Use security.inc that was linked to above.
Put the below in plugin_init(), compile and do a map change. This will create the file in your configs dir.
PHP Code:
security_md5_create_file("7", 17)
Then remove that line and put the below in plugin_init() and compile. It should now be protected. To test the protection, modify the "7" to something else like "8" and it should give you the error about it not being permitted.
PHP Code:
security_md5("7", 17)
|
That's easily bypassed too, you can read how in security.inc thread, xPaw explained it. Anyway,
any protection written on PAWN level can be bypassed by editing AMXX module itself to ignore calls like set_fail_state() from the specific plugin (in fact, I've done it before). Protection has to be done on AMXX module level, for example, custom VM (add more dummy opcodes or whatever). Still by-passable if someone were to copy AMXX from your server to their own, but what are the chances?
EDIT:
But generally, I still have no idea why people protect their plugins. Just don't hand out the source to anyone, keep it to yourself and people you trust. I've even seen people being afraid of their hosting company stealing files - well, you should change your server host then.