quenii 981 Posted March 18, 2013 Essa função faz com que você consiga banir o ip de um player por região. ------------------------------ Primeiramente coloque essa Query em Account no seu MYSQL DROP TABLE IF EXISTS `iptocountry`;CREATE TABLE `iptocountry` ( `IP_FROM` varchar(30) NOT NULL default '', `IP_TO` varchar(30) NOT NULL, `COUNTRY_NAME` varchar(30) NOT NULL, PRIMARY KEY (`IP_FROM`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;Feito, agora abra a nova tabela (iptocountry) Agora você irá adicionar os ips... IP_FROM: Inicio do IP a ser banido IP_TO: Final do IP a ser banido COUNTRY_NAME: ( Você que ira adicionar o local ) Exemplo em imagem E feito, ip banido. ### Função testada e aprovada by - TURK - ### Pseudo Code C++ int __cdecl add_blocked_country_ip(int a1){ int v1; // eax@1 int v2; // edx@1 char *v3; // ecx@1 char v4; // zf@1 int v6; // [sp+20h] [bp-8h]@1 v1 = operator new(8); v6 = v1; v2 = v1; v3 = *(char **)&s_blocked_ip[4]; v4 = *(_DWORD *)&s_blocked_ip[4] == *(_DWORD *)&s_blocked_ip[8]; *(_DWORD *)v1 = *(_DWORD *)a1; *(_DWORD *)(v1 + 4) = *(_DWORD *)(a1 + 4); if ( v4 ) { std__vector_T_BLOCK_IP___std__allocator_T_BLOCK_IP_______M_insert_aux((int)s_blocked_ip, v3, (int)&v6); v2 = v6; } else { if ( v3 ) { *(_DWORD *)v3 = v1; v2 = v6; } *(_DWORD *)&s_blocked_ip[4] = v3 + 4; } return dev_log( (int)"block_country.cpp", 86, (int)"add_blocked_country_ip", 2048, "BLOCKED_IP = %u - %u", *(_DWORD *)v2, *(_DWORD *)(v2 + 4));} signed int __cdecl is_blocked_country_ip(int arg){ int v1; // eax@2 unsigned int v2; // ecx@2 int v3; // ecx@2 char v4; // t0@2 char v5; // t1@2 signed int result; // eax@8 int v7; // [sp+4h] [bp-24h]@7 int v8; // [sp+8h] [bp-20h]@7 signed int v9; // [sp+Ch] [bp-1Ch]@7 const char *v10; // [sp+10h] [bp-18h]@7 int v11; // [sp+14h] [bp-14h]@7 int v12; // [sp+1Ch] [bp-Ch]@1 if ( __inet_aton(arg, &v12) ) { v1 = *(_DWORD *)s_blocked_ip; v3 = v12; v4 = BYTE1(v3); BYTE1(v3) = v12; LOBYTE(v3) = v4; v2 = __ROR__(v3, 16); v5 = BYTE1(v2); BYTE1(v2) = v2; LOBYTE(v2) = v5; while ( v1 != *(_DWORD *)&s_blocked_ip[4] ) { if ( **(_DWORD **)v1 &--#60;= v2 && v2 &--#60;= *(_DWORD *)(*(_DWORD *)v1 + 4) ) { v11 = arg; v10 = "BLOCKED_COUNTRY_IP (%s) : YES"; v9 = 16; v8 = (int)"is_blocked_country_ip"; v7 = 128; goto LABEL_8; } v1 += 4; } dev_log((int)"block_country.cpp", 133, (int)"is_blocked_country_ip", 16, "BLOCKED_COUNTRY_IP (%s) : NO", arg); result = 0; } else { v11 = arg; v9 = 16; v8 = (int)"is_blocked_country_ip"; v10 = "BLOCKED_COUNTRY_IP (%s) : YES"; v7 = 118;LABEL_8: dev_log((int)"block_country.cpp", v7, v8, v9, v10, v11); result = 1; } return result;} void __cdecl __static_initialization_and_destruction_0(int a1, int a2){ int v2; // eax@17 int v3; // [sp+4h] [bp-34h]@12 if ( a2 == 65535 ) { if ( a1 == 1 ) { std__ios_base__Init__Init(&std____ioinit); *(_DWORD *)s_blocked_ip = 0; *(_DWORD *)&s_blocked_ip[4] = 0; *(_DWORD *)&s_blocked_ip[8] = 0; *(_DWORD *)s_block_exception = 0; v2 = std____default_alloc_template_true_0___allocate(0); *(_DWORD *)s_block_exception = v2; *(_DWORD *)(v2 + 4) = 0; *(_DWORD *)v2 = 0; *(_DWORD *)&s_block_exception[4] = 0; *(_DWORD *)(*(_DWORD *)s_block_exception + 8) = *(_DWORD *)s_block_exception; *(_DWORD *)(*(_DWORD *)s_block_exception + 12) = *(_DWORD *)s_block_exception; } if ( !a1 ) { if ( *(_DWORD *)&s_block_exception[4] ) { std___Rb_tree_std__string_std__string_std___Identity_std__string__std__less_std__string__std__allocator_std__string_____M_erase( (int)s_block_exception, *(void **)(*(_DWORD *)s_block_exception + 4)); *(_DWORD *)(*(_DWORD *)s_block_exception + 8) = *(_DWORD *)s_block_exception; *(_DWORD *)(*(_DWORD *)s_block_exception + 4) = 0; *(_DWORD *)(*(_DWORD *)s_block_exception + 12) = *(_DWORD *)s_block_exception; *(_DWORD *)&s_block_exception[4] = 0; } std____default_alloc_template_true_0___deallocate(*(_DWORD *)s_block_exception, 20); } if ( a2 == 65535 ) { if ( !a1 ) { if ( (*(_DWORD *)&s_blocked_ip[8] - *(_DWORD *)s_blocked_ip) &--#62;&--#62; 2 ) std____default_alloc_template_true_0___deallocate( *(_DWORD *)s_blocked_ip, 4 * ((*(_DWORD *)&s_blocked_ip[8] - *(_DWORD *)s_blocked_ip) &--#62;&--#62; 2)); } if ( a2 == 65535 ) { if ( !a1 ) std__ios_base__Init___Init(&std____ioinit, v3); } } }}Thats all! Créditos pela função: - TURK - 8 p0w3r0ff, obetuno, Karbust and 5 others reacted to this Share this post Link to post Share on other sites
lehticia 7 Posted March 18, 2013 Olá Eu Não Entendi Banir Por Região Oque Que Tém ? Como Funciona isso Share this post Link to post Share on other sites
quenii 981 Posted March 18, 2013 Olá Eu Não Entendi Banir Por Região Oque Que Tém ? Como Funciona issoAo bloquear o ip do player, todas e quaisquer derivações do mesmo pela região especificada serão banidas. Share this post Link to post Share on other sites
ƤāƱŁѲ ƒēƦƦēƗƦā 1,220 Posted March 18, 2013 Namoral, esse TURK é um génio nisso -.-'' Casa com ele ae! xD Cumprimentos. Share this post Link to post Share on other sites
xXBoyDarkXx 328 Posted March 18, 2013 Como se instala isso? fiquei um bocado á nora :x Share this post Link to post Share on other sites
obetuno 431 Posted March 19, 2013 Nossa ! Muito melhor assim ! Eu ainda usava o bloqueio de IP pelo Auth server... Vou testar isto. Share this post Link to post Share on other sites
мαя¢σs ๖ۣۣۜDaniel 69 Posted March 19, 2013 Como descubro esses IP's? Share this post Link to post Share on other sites
.Revo 35 Posted April 4, 2013 Quem quiser ver isto, tente jogar metin2 koreano ,pois nao vai conseguir :)Ja conhecia, mas pronto sempre dá jeito. Share this post Link to post Share on other sites
õ.Ô FuckingBoSs õ.Ô 1,565 Posted May 25, 2013 Quem quiser ver isto, tente jogar metin2 koreano ,pois nao vai conseguir :)Ja conhecia, mas pronto sempre dá jeito.Caso não saibas existe proxy's e VPN's se quiser posso me registrar no metin2 koreano Share this post Link to post Share on other sites