AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Is there a way to go past set_fail_state? (https://forums.alliedmods.net/showthread.php?t=222851)

yan1255 08-07-2013 08:46

Is there a way to go past set_fail_state?
 
*TITLE*

YamiKaitou 08-07-2013 08:49

Re: Is there a way to go past set_fail_state?
 
No, once a plugin has been marked as Failed, it halts

claudiuhks 08-07-2013 09:26

Re: Is there a way to go past set_fail_state?
 
A question for you, Yan. Why, if I can ask?

yan1255 08-07-2013 21:36

Re: Is there a way to go past set_fail_state?
 
Quote:

Originally Posted by claudiuhks (Post 2007649)
A question for you, Yan. Why, if I can ask?

Because I know of a plugin that if the server ip address isn't the ip address of the plugin it make set_fail_state and people told me that someone has managed going through this defense and I just want to make sure my plugins are safe.

fysiks 08-07-2013 21:47

Re: Is there a way to go past set_fail_state?
 
Quote:

Originally Posted by yan1255 (Post 2008194)
Because I know of a plugin that if the server ip address isn't the ip address of the plugin it make set_fail_state and people told me that someone has managed going through this defense and I just want to make sure my plugins are safe.

Well, it's not by re-enabling the plugin after a failed state is set. There are other ways.

yan1255 08-07-2013 22:40

Re: Is there a way to go past set_fail_state?
 
Quote:

Originally Posted by fysiks (Post 2008210)
Well, it's not by re-enabling the plugin after a failed state is set. There are other ways.

if the plugin is failing do to the ip address is there a way to re-enable the plugin ?

ConnorMcLeod 08-08-2013 00:30

Re: Is there a way to go past set_fail_state?
 
You have just been said no.

red_bull2oo6 08-08-2013 06:33

Re: Is there a way to go past set_fail_state?
 
if the guy who has your plugin.. knows the ip that the plugin is licensed to, he can bypass it by setting that ip to "net_address" cvar in server.cfg

i tried that and worked.. ( it works only of you get server's ip like this: get_user_ip( 0, etc , etc, etc );

after that i started to get server's ip from: http://checkip.dyndns.com/ using sockets.
( http://forums.alliedmods.net/showpos...06&postcount=4 or http://forums.alliedmods.net/showthr...96#post1157296)


EDIT: i`m talking about this method.

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "New Plugin"
#define VERSION "1.0"

new g_szLicensedIp[ ] = "123.456.789.012:27015";    // Example

public plugin_init( )
{
    
register_pluginPLUGINVERSION"Askhanar" );
    
    new 
szIp25 ];
    
get_user_ip0szIpsizeofszIp ) -1);
    
    if( !
equalg_szLicensedIpszIp ) )
        
set_fail_state"Wrong License!" );
        
    
// Add your code here...


the ip can easily be found by decompilling .amxx with wraith decompiler. because it shows every string directly put in it like = "My String" ( and also format & formatex ).

to fix the bug from above, i did something like this:

PHP Code:

g_szLicensedIp] = '9';
    
g_szLicensedIp] = '2';
    
g_szLicensedIp] = '.';
    
g_szLicensedIp] = '8';
    
g_szLicensedIp] = '0';
    
g_szLicensedIp] = '.';
    
g_szLicensedIp] = '1';
    
g_szLicensedIp] = '6';
    
g_szLicensedIp] = '4';
    
g_szLicensedIp] = '.';
    
g_szLicensedIp10 ] = '1';
    
g_szLicensedIp11 ] = '2';
    
g_szLicensedIp12 ] = '1';
    
g_szLicensedIp13 ] = EOS

hope i helped you, and i hope nobody gets mad on me for explaining this.

devilicioux 08-08-2013 08:56

That info is valuable :D :fox:
Quote:

PHP Code:

g_szLicensedIp] = '9';
    
g_szLicensedIp] = '2';
    
g_szLicensedIp] = '.';
    
g_szLicensedIp] = '8';
    
g_szLicensedIp] = '0';
    
g_szLicensedIp] = '.';
    
g_szLicensedIp] = '1';
    
g_szLicensedIp] = '6';
    
g_szLicensedIp] = '4';
    
g_szLicensedIp] = '.';
    
g_szLicensedIp10 ] = '1';
    
g_szLicensedIp11 ] = '2';
    
g_szLicensedIp12 ] = '1';
    
g_szLicensedIp13 ] = EOS


Can you give a sample code or how you implemented this ?
Sorry i am a learner !! :shock:

YamiKaitou 08-08-2013 08:58

Re: Is there a way to go past set_fail_state?
 
Note: This type of protection is pointless since the SMA must always be distributed if you plan on distributing the AMXX file as well


All times are GMT -4. The time now is 15:44.

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