aboutsummaryrefslogtreecommitdiff
path: root/cgi/framework.py
diff options
context:
space:
mode:
Diffstat (limited to 'cgi/framework.py')
-rw-r--r--cgi/framework.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/cgi/framework.py b/cgi/framework.py
index 83624a8..898d6a1 100644
--- a/cgi/framework.py
+++ b/cgi/framework.py
@@ -96,7 +96,7 @@ def addressIsProxy(ip):
def addressIsES(ip):
ES = ['AR', 'BO', 'CL', 'CO', 'CR', 'CU', 'EC', 'ES', 'GF',
- 'GY', 'GT', 'HN', 'MX', 'NI', 'PA', 'PE', 'PY', 'PR', 'SR', 'UY', 'VE'] # 'BR',
+ 'GY', 'GT', 'HN', 'MX', 'NI', 'PA', 'PE', 'PY', 'PR', 'SR', 'UY', 'VE', 'v6'] # 'BR',
return getCountry(ip) in ES
@@ -105,8 +105,11 @@ def addressIsBannedCountry(ip):
def getCountry(ip):
- import geoip
- return geoip.country(ip)
+ if ":" in ip:
+ return "v6"
+ else:
+ import geoip
+ return geoip.country(ip)
def getHost(ip):