## USE AT YOUR OWN RISK! ## DENIZEN AND THE CREATOR OF THIS SCRIPT WILL NOT TAKE RESPONSIBILITY OF ANY PROBLEMS THAT OCCURS! # This script uses iphub's API to find out if a user comes from a malicious IP. # The server will only attempt to ip-ban the target. This should not affect the user itself. # You can read more about their project at http://iphub.info/ # Fair warnings: # - You can not always expect this to work and be correct. # - Using this on a larger scale server may require you to contact iphub with their email on their website. # - The API used is the legacy of iphub. This may change. # Config Data below - Please edit before use! GeoIP_Data: type: yaml data config: # If left default, the script won't work! Email: fakemail@gmail.com # This is more for the logs, if the IP does not go under this list, is it considered a suspected IP in the logs. Country_Sides: - "Denmark" - "Greenland" - "Faroe Islands" - "Faroe_Islands" # Origins you wish the check should ignore Ignore_Origins: - "AS31027_Nianet_A/S" - "AS28717_Zen_Systems_A/S" - "AS16245_Netgroup_A/S" # If you can to ignore a specific IP Ignore_IPs: - "104.207.84.18" # This list below is currently unused, no need to edit. VPN_Origins: - "IPVanish" - "Bitpro" - "Mudhook" - "True Internet" - "Creanova" - "Leaseweb" - "XServer" - "Voxility" - "Express" - "AVAST" - "Vargonen" - "Ubiquity" - "BrainStorm" - "AltusHost" - "HETZNER" - "Equinix" - "Portlane" - "DataClub" - "Selectel" - "SoftLayer" - "Anexia" - "Iliad" - "Dedicated" - "Pure" - "HMA" - "Astrill" - "Strong" - "HideMyAss" - "VPN" - "Artnet" - "EASYSPEEDY" - "ONLINE SAS" - "Powerhouse" - "AltusHost" - "ServerSpace" - "Vodafone" # End of config ################################################ ## SCRIPT STUFF BELOW ################################################ GeoIP_Events: type: world debug: false events: on player join: - wait 10t - run GeoIP_Check_Task instantly context: GeoIP_Check_Task: type: task definitions: target script: - if == fakemail@gmail.com { - queue clear } - if { # - narrate "Spilleren blev ikke fundet" - queue clear } - define path "" - if { - define ip ]||null> } else { - define ip ]||null> } - if == null { - log " () FAILED IP - " type:warning file:geoiplog.log - queue clear } else if == "" { - log " () FAILED IP - " type:warning file:geoiplog.log - queue clear } - if ]> { - queue clear } - ~webget "http://legacy.iphub.info/api.php?ip=&showtype=2&email=" save:page - flag server : duration:4h - if == null { - log " () FAILED - " type:warning file:geoiplog.log - queue clear } - define data ]||li@> - if != 6 { - log " () FAILED - " type:warning file:geoiplog.log - queue clear } - define country "" - define countryCode "" - define city "" - define origin "" - define is_host "" - define file "plugins/Denizen/data/geoIP/logs/--.log" - if ]> { - log " () - () - - (Ignored)" type:info file: } else if ]> { - log " () - () - - (Ignored)" type:info file: } else if "" != 0 { - - execute as_server "banip -s Auto-Ban VPN ()" + - execute as_server "banip Auto-Ban VPN ()" - log " () - () - - (VPN)" type:info file: } else if ]> { - log " () - () - - " type:info file: } else { - log " () - () - - (Suspected)" type:info file: }