Block VPN/proxy
#1
hola ando buscando un complemente que bloquee las VPN/proxy. porque cansado de los chiteros que arruinan un juego de mas de 20 años y tienen vpn.

alguna sugerencia? aparte del block vpn
Responder
#2
[Imagen: 5d426af598af9.jpeg]
[Imagen: zcsztw-4.png] [Imagen: 6u5fj2-4.png]
[Imagen: linkedin_thumb_image.png][Imagen: 76561198283253977.png][Imagen: linkedin_thumb_image.png]
Responder
#3
No hay mucho que hacer, ya que no puedes obtener un id unico del cliente, ya con eso F
Responder
#4
(06/10/2022, 06:46 PM)MatiasGFaria escribió: hola ando buscando un complemente que bloquee las VPN/proxy. porque cansado de los chiteros que arruinan un juego de mas de 20 años y tienen vpn.

alguna sugerencia? aparte del block vpn

Código PHP:
#include <amxmodx>
#include <nvault>
#include <httpx>

//#define USE_ADDIP_CMD

#define IP_LENGTH 16

#if !defined PLATFORM_MAX_PATH
 #define PLATFORM_MAX_PATH 256
#endif

new g_szDataDir[PLATFORM_MAX_PATH];
new 
g_hVault INVALID_HANDLE;

public 
plugin_init() {
 
register_plugin("Proxy/VPN check""1.1b""juice");
}

public 
plugin_cfg() {
 
g_hVault nvault_open("proxycheck");
 
 if(
g_hVault == INVALID_HANDLE) {
 
set_fail_state("Error opening nVault!");
 return;
 }
 
 
get_localinfo("amxx_datadir"g_szDataDircharsmax(g_szDataDir));
 
add(g_szDataDircharsmax(g_szDataDir), "/proxycheck");
 
 if(!
dir_exists(g_szDataDir)) {
 
mkdir(g_szDataDir);
 }
}

public 
client_putinserver(id) {
 if(
is_user_bot(id) || is_user_hltv(id)) {
 return;
 }
 
 new 
szIP[IP_LENGTH];
 
get_user_ip(idszIPcharsmax(szIP), .without_port 1);

 if(
equal(szIP"loopback")) {
 return;
 }
 else {
 new 
szIPcopy[IP_LENGTH];
 
copy(szIPcopycharsmax(szIPcopy), szIP);
 
replace_all(szIPcopycharsmax(szIPcopy), "."" ");
 
 new 
szFields[4][4];
 
parse(szIPcopyszFields[0], charsmax(szFields[]),
 
szFields[1], charsmax(szFields[]),
 
szFields[2], charsmax(szFields[]),
 
szFields[3], charsmax(szFields[]));
 
 new 
address = (str_to_num(szFields[0]) << 24) |
 (
str_to_num(szFields[1]) << 16) |
 (
str_to_num(szFields[2]) << 8) |
 (
str_to_num(szFields[3]));
 
 
// Ignore private IPv4 address spaces
 
if((address 0xFF000000) == 0x0A000000 || //10.0.0.0/8
 
(address 0xFFF00000) == 0xAC100000 || //172.16.0.0/12
 
(address 0xFFFF0000) == 0xC0A80000//192.168.0.0/16 
 
{
 return;
 }
 }
 
 new 
data nvault_get(g_hVaultszIP);

 if(
data) {
 if(
data == 1) {
 
punish_player(id);
 }
 return;
 }
 
 new 
szFile[PLATFORM_MAX_PATH];
 
formatex(szFilecharsmax(szFile), "%s/check_%s.txt"g_szDataDirszIP);
 
 if(!
file_exists(szFile)) {
 new 
szRequest[68];
 
formatex(szRequestcharsmax(szRequest), "http://proxy.mind-media.com/block/proxycheck.php?ip=%s"szIP);
 
HTTPX_Download(szRequestszFile"DownloadComplete"__REQUEST_GET);
 }
}

public 
DownloadComplete(const download, const error) {
 new 
szFile[PLATFORM_MAX_PATH];
 
HTTPX_GetFilename(downloadszFilecharsmax(szFile));
 
 if(!
error) {
 new 
file fopen(szFile"r");

 if(
file) {
 new 
data[2];
 
fgets(filedatacharsmax(data));
 
 if(
data[0] == 'Y' || data[0] == 'N') {
 new 
pos_start strfind(szFile"check_"falsestrlen(g_szDataDir));
 new 
pos_end = (pos_start == -1) ? -strfind(szFile".txt"false, (pos_start += 6));
 
 if(
pos_end != -1) {
 new 
szIP[IP_LENGTH];
 
add(szIPcharsmax(szIP), szFile[pos_start], pos_end pos_start);
 
 if(
data[0] == 'Y') {
 new 
id find_player("d"szIP);

 if(
id) {
 
punish_player(id);
 }

 
nvault_set(g_hVaultszIP"1");
 
#if defined USE_ADDIP_CMD
 
server_cmd("addip 0 %s;wait;writeip"szIP);
 
#endif
 
}
 else {
 
nvault_set(g_hVaultszIP"2");
 } 
 }
 }
 
fclose(file);
 }
 }
 
delete_file(szFile);
}

punish_player(id) {
 
server_cmd("kick #%d ^"Proxy/VPN not Allowed!^""get_user_userid(id));



Archivos adjuntos
.inc   httpx.inc (Tamaño: 8.1 KB / Descargas: 3)
(13/05/2017, 02:11 PM)DiCHANHO escribió: off: pobre este ya quedo traumado con lo del autor y robo de plugins
(26/07/2020, 08:32 PM)Hinami escribió: & si soy un gordo cagon, virgen, con posters de anime en todas partes
✅✅Aportes✅✅
Datear Automáticamente CincoYA
Efecto Trueno y Rayo

Responder
#5
Me intereso el codigo y lo pase a sockets para que no tengan que hacer uso de ninguna otra libreria o modulo.
De igual forma tambien optimice el codigo!
Código PHP:
#include <amxmodx>
#include <sockets>

new g_Socket;
new const 
g_host[]="blackbox.ipinfo.app";

public 
plugin_init() {
    
register_plugin("[AMXX] Block VPN""b2.1""Alejandro-.");
    new 
iError;
    
g_Socket socket_open(g_host80SOCKET_TCPiError);
    if (
iError) {
        
log_amx("[AMXX] Sockets error: %i"iError);
        return;
    }
}
public 
client_authorized(index) {
    if (
is_user_hltv(index) || is_user_bot(index)) return;
    new 
buffer[100], ip[MAX_IP_LENGTH];
    
get_user_ip(indexipcharsmax(ip), 1);
    if(
equal(ip"loopback") || equal(ip"127.0.0.1") || contain(ip"192.168.") == || contain(ip,"10.") == || contain(ip,"172.") == 0) return;
    
formatex(buffercharsmax(buffer), "GET /lookup/%s/ HTTP/1.1^nHost:%s^r^n^r^n"ipg_host);
    
socket_send(g_Socketbuffercharsmax(buffer));
    
set_task(1.0"task_waitanswer"index 1231""0"a"15);
}
public 
task_waitanswer(taskid) {
    new 
index = (taskid 1231)
    if (
socket_is_readable(g_Socket)) {
        new 
data[1300];
        
socket_recv(g_Socketdatacharsmax(data));
        if (!
data[0]) {
            
remove_task(taskid);
            return;
        }
        if (
contain(data[strlen(data) - 2], "Y") != -1) {
             
server_cmd("kick #%i ^"Proxy/VPN no permitido!^""get_user_userid(index));
        }
        
remove_task(taskid);
    }
}
public 
plugin_end() socket_close(g_Socket); 
1
Responder
#6
(06/10/2022, 06:46 PM)MatiasGFaria escribió: hola ando buscando un complemente que bloquee las VPN/proxy..

Proxy snort ó proxy_check
Responder
#7
(06/10/2022, 09:40 PM)Alejandro escribió: Me intereso el codigo y lo pase a sockets para que no tengan que hacer uso de ninguna otra libreria o modulo.
De igual forma tambien optimice el codigo!
Código PHP:
#include <amxmodx>
#include <sockets>

new g_Socket;
new const 
g_host[]="blackbox.ipinfo.app";

public 
plugin_init() {
 
register_plugin("[AMXX] Block VPN""b2.1""Alejandro-.");
 new 
iError;
 
g_Socket socket_open(g_host80SOCKET_TCPiError);
 if (
iError) {
 
log_amx("[AMXX] Sockets error: %i"iError);
 return;
 }
}
public 
client_authorized(index) {
 if (
is_user_hltv(index) || is_user_bot(index)) return;
 new 
buffer[100], ip[MAX_IP_LENGTH];
 
get_user_ip(indexipcharsmax(ip), 1);
 if(
equal(ip"loopback") || equal(ip"127.0.0.1") || contain(ip"192.168.") == || contain(ip,"10.") == || contain(ip,"172.") == 0) return;
 
formatex(buffercharsmax(buffer), "GET /lookup/%s/ HTTP/1.1^nHost:%s^r^n^r^n"ipg_host);
 
socket_send(g_Socketbuffercharsmax(buffer));
 
set_task(1.0"task_waitanswer"index 1231""0"a"15);
}
public 
task_waitanswer(taskid) {
 new 
index = (taskid 1231)
 if (
socket_is_readable(g_Socket)) {
 new 
data[1300];
 
socket_recv(g_Socketdatacharsmax(data));
 if (!
data[0]) {
 
remove_task(taskid);
 return;
 }
 if (
contain(data[strlen(data) - 2], "Y") != -1) {
 
server_cmd("kick #%i ^"Proxy/VPN no permitido!^""get_user_userid(index));
 }
 
remove_task(taskid);
 }
}
public 
plugin_end() socket_close(g_Socket); 

Cita:L 10/12/2022 - 03:43:04: [SOCKET] Invalid Socket: SocketID (184)
L 10/12/2022 - 03:43:04: [AMXX] Displaying debug trace (plugin "Block_VPN.amxx", version "b2.1")
L 10/12/2022 - 03:43:04: [AMXX] Run time error 10: native error (native "socket_send")
L 10/12/2022 - 03:43:04: [AMXX] [0] Block_VPN.sma::client_authorized (line 22)
Responder
#8
Código PHP:
#include <amxmodx>
#include <sockets>

new g_Socket 0;
new const 
g_host[]="blackbox.ipinfo.app";

public 
plugin_init() {
    
register_plugin("[AMXX] Block VPN""b2.1""Alejandro-.");
    if (!
g_Socketcreate_sockets();
}
public 
client_authorized(index) {
    if (!
g_Socketcreate_sockets();
    if (
is_user_hltv(index) || is_user_bot(index) || !g_Socket) return;
    new 
buffer[100], ip[MAX_IP_LENGTH];
    
get_user_ip(indexipcharsmax(ip), 1);
    if(
equal(ip"loopback") || equal(ip"127.0.0.1") || contain(ip"192.168.") == || contain(ip,"10.") == || contain(ip,"172.") == 0) return;
    
formatex(buffercharsmax(buffer), "GET /lookup/%s/ HTTP/1.1^nHost:%s^r^n^r^n"ipg_host);
    
socket_send(g_Socketbuffercharsmax(buffer));
    
set_task(1.0"task_waitanswer"index 1231""0"a"15);
}
public 
task_waitanswer(taskid) {
    new 
index = (taskid 1231)
    if (
socket_is_readable(g_Socket)) {
        new 
data[1300];
        
socket_recv(g_Socketdatacharsmax(data));
        if (!
data[0]) {
            
remove_task(taskid);
            return;
        }
        if (
contain(data[strlen(data) - 2], "Y") != -1) {
             
server_cmd("kick #%i ^"Proxy/VPN no permitido!^""get_user_userid(index));
        }
        
remove_task(taskid);
    }
}
public 
plugin_end() socket_close(g_Socket);
create_sockets() {
    new 
iError;
    
g_Socket socket_open(g_host80SOCKET_TCPiError);
    if (
iError) {
        
log_amx("[AMXX] Sockets error: %i"iError);
        return;
    }


ya ahi esta resuelto el problema...
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)