AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] protected plugin for LAN (https://forums.alliedmods.net/showthread.php?t=275175)

arvEL. 11-23-2015 21:39

[HELP] protected plugin for LAN
 
hi guys, here i have codes to protect plugin to work on IP ADDRESS

PHP Code:

// Address Protection
#define ADDRESS_PROTECTION "11.11.11.11:22222" 

// DNS Protection
#define DNS_PROTECTION "" 

PHP Code:


// Client joins the game
public client_putinserver(id)
{

// Address protection
static address[32], name[32]
get_cvar_string("net_address"addresscharsmax(address))    
get_cvar_string("hostname"namecharsmax(name))
if (!
equal(ADDRESS_PROTECTIONaddress) || !contain(nameDNS_PROTECTION)) set_fail_state("This addons protected"

i want a
utomatic detection about LAN IP not public IP
and protect this plugin with LAN IP

fysiks 11-23-2015 21:59

Re: [HELP] protected plugin for LAN
 
If you would have searched, you would have found that there is NO reliable way to protect a plugin other than not giving out the plugin.

arvEL. 11-24-2015 01:13

Re: [HELP] protected plugin for LAN
 
Quote:

Originally Posted by fysiks (Post 2365820)
If you would have searched, you would have found that there is NO reliable way to protect a plugin other than not giving out the plugin.

why responses always frustrating?

zmd94 11-24-2015 06:11

Re: [HELP] protected plugin for LAN
 
https://forums.alliedmods.net/showthread.php?t=185491

fysiks 11-24-2015 20:07

Re: [HELP] protected plugin for LAN
 
Quote:

Originally Posted by arvEL. (Post 2365839)
why responses always frustrating?

Because people ask this question all the time and the answer will never change. Also, people just need to stop being so paranoid. If you don't want other people to have your plugin, don't give anyone access to your plugin. It's simple and effective (considering that all alternative like the one posted by zmd94 can easily be bypassed).

Bugsy 11-24-2015 21:48

Re: [HELP] protected plugin for LAN
 
Quote:

Originally Posted by arvEL. (Post 2365819)
hi guys, here i have codes to protect plugin to work on IP ADDRESS

i want automatic detection about LAN IP not public IP
and protect this plugin with LAN IP

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


Freezo Begin 12-06-2015 17:57

Re: [HELP] protected plugin for LAN
 
i don't know why do you need to protect ur plugin with LAN ...

Anyway :

Quote:

Originally Posted by Freezo Begin (Post 2338743)
  • Make a license by checking a file. ( its made by Neeeeeeeeeeel.- ) can be bypassed by deleting the file.
  • Making a license with ip can be bypassed by net_address
  • Making a license with socket can be bypassed by adding a module Amxx protect( block socket(send/receive))
  • Making a lisence with time, you can change server system time, as yokomo said.


klippy 12-06-2015 19:14

Re: [HELP] protected plugin for LAN
 
Quote:

Originally Posted by Bugsy (Post 2366081)
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.

Bugsy 12-06-2015 19:34

Re: [HELP] protected plugin for LAN
 
The average shmo doesn't know how to bypass security. Those knowledgeable enough to do so can probably code their own, or know someone who can. But I agree, if it's that much of a concern, don't leak the source out to anyone.

fysiks 12-06-2015 22:15

Re: [HELP] protected plugin for LAN
 
Quote:

Originally Posted by Bugsy (Post 2369481)
The average shmo doesn't know how to bypass security.

The average shmo also doesn't have access to your password protected FTP or server files :wink:


All times are GMT -4. The time now is 18:07.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.