initial commit of file from CVS for smeserver-xt_geoip on Sat Sep 7 16:46:09 AEST 2024
This commit is contained in:
11
root/usr/share/xt_geoip/geoip_look
Normal file
11
root/usr/share/xt_geoip/geoip_look
Normal file
@@ -0,0 +1,11 @@
|
||||
#! /bin/bash
|
||||
|
||||
for par in "$@"
|
||||
do
|
||||
|
||||
CN=$(/usr/bin/mmdblookup --file /usr/share/GeoIP/GeoLite2-Country.mmdb --ip $par country iso_code 2>/dev/null | cut -d\" -f2| tr -d '\n')
|
||||
if [ -z $CN ]; then echo 'XX'; else echo $CN; fi
|
||||
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user