Raised This Month: $ Target: $400
 0% 

[Orpheu] SV_ClientConnect & Con_Printf


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 07-02-2012 , 11:18   Re: [Orpheu] SV_ClientConnect & Con_Printf
Reply With Quote #7

Well, I tried your code but now I have other problem.
I'm trying to fix a new hlfill exploit... When I tried the first time it works, but not now... is it something wrong?

Here is full code:
PHP Code:
#include <amxmodx>
#include <orpheu>

#define PLUGIN "Anti Fake Bot"
#define VERSION "1.0"
#define AUTHOR "kanagava"

new ip_old256 ], ip_warn256 ], Msg256 ];

new 
OrpheuHook:handlePrintf

new time_last_connwarnold_timeregistered;

public 
plugin_init( )
{
    
register_pluginPLUGINVERSIONAUTHOR );
    
    
OrpheuRegisterHookOrpheuGetFunction"SV_ConnectClient" ),"OnSV_ConnectClientPre"OrpheuHookPre );
    
OrpheuRegisterHookOrpheuGetFunction"SV_ConnectClient" ),"OnSV_ConnectClientPost"OrpheuHookPost );
}

public 
OrpheuHookReturn:OnSV_ConnectClientPre( )
{
    
registered 0;
    
    if( 
get_systime( ) - old_time <= )
    {
        
handlePrintf OrpheuRegisterHookOrpheuGetFunction"Con_Printf" ), "Con_Printf" OrpheuHookPre );
        
registered 1;
    }
    
    
old_time get_systime( );
    
    return 
OrpheuIgnored;
}

public 
OrpheuHookReturn:OnSV_ConnectClientPost( )
{
    if( 
registered )
        
OrpheuUnregisterHookhandlePrintf );

    return 
OrpheuIgnored;
}

public 
OrpheuHookReturn:Con_Printf( const a[ ], const message[ ] )
{
    
registered 1;

    if( 
containimessage,"^" connectedaddress ^"" ) != -)
    {
        new 
len 255;
        new 
temp_right256 ], temp_left256 ], conn_ip256 ];
        
        
formatexMsg,charsmaxMsg ),"%s"message );
        
        
splitMsgtemp_leftlentemp_rightlen"^" connectedaddress ^"" );
        
strtoktemp_rightconn_iplentemp_rightlen':' );
        
        if( 
equalconn_ip,ip_old ) && !equalconn_ip,"" ) && ( ( get_systime( ) - time_last_conn ) < ) )
        {
            
warn warn 1;
            
            if( 
warn && equalconn_ipip_warn ) )
            {
                
/*static id;
                id = find_player( "d", ip_old );
                
                static szName[ 32 ], szSteamID[ 64 ];
                
                get_user_name( id, szName, charsmax( szName ) );
                get_user_authid( id,szSteamID, charsmax( szSteamID ) );*/
                
                
                
log_to_file"orpheu_bot_block.txt""[Fake Bot Flood] Flood stopped from: %s - Name: \
                 - SteamID:  - Tipo: "
ip_old/*, szName, szSteamID, is_user_bot( id ) ? "BOT" : "PLAYER"*/ );
                
                
server_cmd"addip 120.0 %s"ip_old );
            }
            
            
ip_warn conn_ip;
        }
        
        else
            
warn 0;
        
        
ip_old conn_ip;
        
time_last_conn get_systime( );
    }
    
    return 
OrpheuIgnored;

HTML Code:
{
    "name" : "SV_ConnectClient",
    "library" : "engine",
    "identifiers" :
    [
        {
            "os" : "windows",
            "value" : [0x55,0x8B,0xEC,0x81,"*","*","*","*","*",0x53,0x56,0x57,0xB9,0x05,0x00,0x00,0x00,0xBE,"*","*","*","*",0x8D,"*","*",0x33,0xDB,0x68,"*","*","*","*"]
        },
        {
            "os" : "linux",
            "value" : "SV_ConnectClient"
        }
    ]
}
HTML Code:
{
    "name"      : "Con_Printf",
    "library"   : "engine",
    "arguments" : 
    [
        {
            "type" : "char *" 
        },
        {
            "type" : "char *" 
        }
    ],
    "identifiers" : 
    [
        {
            "os"    : "windows",
            "mod"   : "cstrike",
            "value" : [0x55,0x8B,0xEC,0xB8,"*","*","*","*",0xE8,"*","*","*","*",0x8B,"*","*",0x8D,"*","*",0x50,0x51,0x8D,0x95,"*","*","*","*",0x68,"*","*","*","*",0x52,0xE8,"*","*","*","*",0x8D,0x85,"*","*","*","*",0x50]
        },
        {
            "os"    : "linux",
            "mod"   : "cstrike",
            "value" : "Con_Printf"
        } 
    ]
}
__________________

Last edited by Neeeeeeeeeel.-; 07-02-2012 at 11:21.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
 



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:04.


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