Raised This Month: $ Target: $400
 0% 

Is there a way to go past set_fail_state?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
red_bull2oo6
Senior Member
Join Date: Mar 2012
Location: Braila, Romania
Old 08-08-2013 , 06:33   Re: Is there a way to go past set_fail_state?
Reply With Quote #8

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.

Last edited by red_bull2oo6; 08-08-2013 at 06:55.
red_bull2oo6 is offline
 



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 15:44.


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