Raised This Month: $51 Target: $400
 12% 

Solved what's the problem?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
loiraolhosazul
Member
Join Date: May 2020
Old 10-22-2020 , 09:40   what's the problem?
Reply With Quote #1

even adding the correct ip the plugin closes.
why?

PHP Code:
new const list_allow_ips[][] =
{
    
"192.168.0.125:27015",
    
"123.456.789.012:27015"
}

new 
server_ip[64], i
get_user_ip
(0server_ipcharsmax(server_ip), false)
    
set_cvar_string("net_address"server_ip)

for(
0sizeof(list_allow_ips); i++)
{
    if(!
equal(server_iplist_allow_ips[i]))
    {
        
set_fail_state("no man :)")
    }


Last edited by loiraolhosazul; 10-22-2020 at 11:00.
loiraolhosazul is offline
r0ma
Senior Member
Join Date: Apr 2012
Location: Great Tomb of Nazarick
Old 10-22-2020 , 10:47   Re: what's the problem?
Reply With Quote #2

Test:
PHP Code:
    new iFound false;
    
    for(
0sizeof(list_allow_ips); i++) {
        if(
equal(server_iplist_allow_ips[i])) {
            
iFound true;
            break;
        }
    }
    
    if(!
iFound)
        
set_fail_state("no man :)"); 
__________________
Discord:FluffyDeveloper#4753
Github: https://github.com/francoromaniello
AMX-ES: https://amxmodx-es.com/r0ma'
r0ma is offline
Send a message via MSN to r0ma
loiraolhosazul
Member
Join Date: May 2020
Old 10-22-2020 , 11:00   Re: what's the problem?
Reply With Quote #3

Quote:
Originally Posted by r0ma View Post
Test:
PHP Code:
    new iFound false;
    
    for(
0sizeof(list_allow_ips); i++) {
        if(
equal(server_iplist_allow_ips[i])) {
            
iFound true;
            break;
        }
    }
    
    if(!
iFound)
        
set_fail_state("no man :)"); 
works, thx
loiraolhosazul is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-22-2020 , 11:07   Re: what's the problem?
Reply With Quote #4

Your protection is useless and can be broken in several ways. The only way to keep your plugin private is not to share it with anyone else.

One way to break it:
1. Hook set_fail_state with orpheu.
2. Block the native call and print "yes man " just for the laughs.
3. Profit???

Another thing, get_user_ip(0, ...) gets the ip from net_address so what you are doing there is set_cvar(net_address, get_cvar(net_address)). Very useful.
__________________

Last edited by HamletEagle; 10-22-2020 at 11:11.
HamletEagle is offline
r0ma
Senior Member
Join Date: Apr 2012
Location: Great Tomb of Nazarick
Old 10-22-2020 , 12:11   Re: what's the problem?
Reply With Quote #5

Quote:
Originally Posted by HamletEagle View Post
Your protection is useless and can be broken in several ways. The only way to keep your plugin private is not to share it with anyone else.

One way to break it:
1. Hook set_fail_state with orpheu.
2. Block the native call and print "yes man " just for the laughs.
3. Profit???

Another thing, get_user_ip(0, ...) gets the ip from net_address so what you are doing there is set_cvar(net_address, get_cvar(net_address)). Very useful.
or just change net_address before the check xD
btw for someone with not idea of programming its sufficient
__________________
Discord:FluffyDeveloper#4753
Github: https://github.com/francoromaniello
AMX-ES: https://amxmodx-es.com/r0ma'
r0ma is offline
Send a message via MSN to r0ma
loiraolhosazul
Member
Join Date: May 2020
Old 10-22-2020 , 23:14   Re: what's the problem?
Reply With Quote #6

Quote:
Originally Posted by r0ma View Post
or just change net_address before the check xD
btw for someone with not idea of programming its sufficient
exact
loiraolhosazul is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-23-2020 , 00:31   Re: what's the problem?
Reply With Quote #7

Quote:
Originally Posted by r0ma View Post
or just change net_address before the check xD
btw for someone with not idea of programming its sufficient
Ever heard of the internet?
__________________
fysiks is offline
r0ma
Senior Member
Join Date: Apr 2012
Location: Great Tomb of Nazarick
Old 10-23-2020 , 05:07   Re: what's the problem?
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
Ever heard of the internet?
Not really, why ?

if someone only have the .amxx and try to avoid the ip check, need to have basic knowledge about amxx and amxx dump/uncompress. Its not just enter to internet and magic happens, or paid to someone able to do dat.

Its a very basic "security" ? Yes of course, but some times its just enough
__________________
Discord:FluffyDeveloper#4753
Github: https://github.com/francoromaniello
AMX-ES: https://amxmodx-es.com/r0ma'
r0ma is offline
Send a message via MSN to r0ma
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-23-2020 , 06:51   Re: what's the problem?
Reply With Quote #9

Quote:
Originally Posted by r0ma View Post
Not really, why ?

if someone only have the .amxx and try to avoid the ip check, need to have basic knowledge about amxx and amxx dump/uncompress. Its not just enter to internet and magic happens, or paid to someone able to do dat.

Its a very basic "security" ? Yes of course, but some times its just enough
Why would someone have the amxx and not the sma? The license forbids distributing plugins without source.
__________________
HamletEagle is offline
r0ma
Senior Member
Join Date: Apr 2012
Location: Great Tomb of Nazarick
Old 10-23-2020 , 09:41   Re: what's the problem?
Reply With Quote #10

Quote:
Originally Posted by HamletEagle View Post
Why would someone have the amxx and not the sma? The license forbids distributing plugins without source.
in my case sometime hostings not have enough security and someone stolen server files/plugins.
happened in all hosting in Argentina a few years ago (2011-2013 maybe), was a nice time for learning about security and how hosting are so bad administration.
__________________
Discord:FluffyDeveloper#4753
Github: https://github.com/francoromaniello
AMX-ES: https://amxmodx-es.com/r0ma'
r0ma is offline
Send a message via MSN to r0ma
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 06:56.


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