Raised This Month: $32 Target: $400
 8% 

[HELP] protected plugin for LAN


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 11-23-2015 , 21:39   [HELP] protected plugin for LAN
Reply With Quote #1

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
__________________
arvEL. is offline
Send a message via Skype™ to arvEL.
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-23-2015 , 21:59   Re: [HELP] protected plugin for LAN
Reply With Quote #2

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.
__________________
fysiks is offline
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 11-24-2015 , 01:13   Re: [HELP] protected plugin for LAN
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
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?
__________________
arvEL. is offline
Send a message via Skype™ to arvEL.
Old 11-24-2015, 01:45
Chihuahuax
This message has been deleted by Chihuahuax. Reason: nvm
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-24-2015 , 06:11   Re: [HELP] protected plugin for LAN
Reply With Quote #4

https://forums.alliedmods.net/showthread.php?t=185491
zmd94 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-24-2015 , 20:07   Re: [HELP] protected plugin for LAN
Reply With Quote #5

Quote:
Originally Posted by arvEL. View Post
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).
__________________
fysiks is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-24-2015 , 21:48   Re: [HELP] protected plugin for LAN
Reply With Quote #6

Quote:
Originally Posted by arvEL. View Post
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
__________________

Last edited by Bugsy; 11-26-2015 at 10:47.
Bugsy is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 12-06-2015 , 17:57   Re: [HELP] protected plugin for LAN
Reply With Quote #7

i don't know why do you need to protect ur plugin with LAN ...

Anyway :

Quote:
Originally Posted by Freezo Begin View Post
  • 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.
Freezo Begin is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-06-2015 , 19:14   Re: [HELP] protected plugin for LAN
Reply With Quote #8

Quote:
Originally Posted by Bugsy View Post
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.

Last edited by klippy; 12-06-2015 at 19:23.
klippy is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-06-2015 , 19:34   Re: [HELP] protected plugin for LAN
Reply With Quote #9

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.
__________________
Bugsy is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-06-2015 , 22:15   Re: [HELP] protected plugin for LAN
Reply With Quote #10

Quote:
Originally Posted by Bugsy View Post
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
__________________

Last edited by fysiks; 12-06-2015 at 22:17.
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:24.


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