Raised This Month: $23 Target: $400
 5% 

Proxy Check (AS)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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, 31 views)
File Type: sma Get Plugin or Get Source (proxyChecker.sma - 69 views - 7.7 KB)
__________________
• AutoMix 5vs5 System + Web Stats
• Plugins for free

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

Last edited by EFFx; 05-12-2024 at 17:02.
EFFx is offline
 


Thread Tools
Display Modes

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


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