This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Proxy Check (AS)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-10-2024 , 16:02   Proxy Check (AS)
Reply With Quote #1

Proxy & AS Check/Register

not a plugin submission, just another example on how to work with EzHTTP


Made this a long time ago due a group of cheaters that would terrorize public servers. This system helped hold them a little bit for some more time and definitely was useful.

Basically, it uses the same API as DJEarthQuake's Proxy Snort uses. It gets the user IP and checks whether it results in Proxy or not. Check Proxy Check official site to learn more about the API Key.

When a player joins, the plugin will use EasyHTTP to make a HTTP request on the site and get the status of the user's IP as JSON:

PHP Code:
{
    
"status""ok",
    
"131.87.133.121": {
        
"asn""AS721",
        
"range""131.87.133.0/18",
        
"provider""DoD Network Information Center",
        
"organisation""DoD Network Information Center",
        
"continent""North America",
        
"continentcode""NA",
        
"country""United States",
        
"isocode""US",
        
"region""Ohio",
        
"regioncode""OH",
        
"timezone""America/New_York",
        
"city""Whitehall",
        
"postcode""43218",
        
"latitude"39.9747,
        
"longitude": -82.8947,
        
"proxy""no",
        
"type""Business",
        
"risk"0
    
}

If either status is not "ok" or proxy returns "yes", the user connection on the server is blocked (not considering status denied, which is the response when the API is not valid).
In case of the connection is permitted, the user's AS (asn in the json) gets registered inside the array for the user to choose what they want to do with it (In this example it is used as a more complex Ban System whereas it bans the AS instead of SteamID or IP which can be easily changed nowdays).

Keep in mind that it is not 100% safe, mfs still find a way to change their AS somehow, lets see who gets tired first

You MUST use EzHTTP for it to run properly. As I mentioned in some previous posts, it makes the life easier.

There is a simple API with two natives

PHP Code:
/* Native that get user's AS */
native proxy_get_user_as(iPlayerszUserAS[], iLen)

/* Finds user's AS by IP */
native proxy_get_as_byip(szIP[], szUserAS[], iLen

Commands avaliable:

amx_ban_as - Ban AS
amx_unban_as - Unban AS
amx_as_menu - Opens players's AS menu (press to ban)

Still working on it and accepting ideas on how to improve it. Cheers
Attached Files
File Type: inc as.inc (242 Bytes, 17 views)
File Type: sma Get Plugin or Get Source (proxyChecker.sma - 20 views - 7.7 KB)
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 05-12-2024 at 17:02.
EFFx is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-10-2024 , 16:02   Re: Proxy Check (AS)
Reply With Quote #2

Known Issues:

Players with the same AS, that were not related to the ban may get affected.
-

Example on how to get user's AS. Feel free to use it as you wish.

PHP Code:
#include <amxmodx>
#include <as>

#define PLUGIN "My AS"
#define VERSION "1.0"
#define AUTHOR "EFFEX"

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /as""getMyAS")
}

public 
getMyAS(id)
{
    new 
szUserAS[MAX_PLAYERS]
    
proxy_get_user_as(idszUserAScharsmax(szUserAS))
    
    
client_print(idprint_chat"Your AS: %s"szUserAS)

-

All JSON responses gets saved inside addons/amxmodx/data/json directory.
Check as_register.log inside logs folder to see the history of the connected players and their informations.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 05-11-2024 at 10:48.
EFFx is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-11-2024 , 10:29   Re: Proxy Check (AS)
Reply With Quote #3

Is using the ASN to cover them changing IP within same network? I have found when they change IP it changes country and city and not within the ASN.
__________________
DJEarthQuake is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-11-2024 , 10:49   Re: Proxy Check (AS)
Reply With Quote #4

Quote:
Originally Posted by DJEarthQuake View Post
Is using the ASN to cover them changing IP within same network? I have found when they change IP it changes country and city and not within the ASN.
During two weeks watching the cheaters, I noticed that sometimes the AS was the same even though they changed the IP.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 05-12-2024 , 06:26   Re: Proxy Check (AS)
Reply With Quote #5

interesting... It may be the closest thing to capturing the MAC
__________________
mlibre is offline
bnlsuperstar
New Member
Join Date: Mar 2023
Old 05-19-2024 , 11:44   Re: Proxy Check (AS)
Reply With Quote #6

can you do an tutorial how we should install..


thanks.
bnlsuperstar is offline
Reply



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 07:25.


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