From 3693f572b119cf172be0f669313bdb8314cbbdc2 Mon Sep 17 00:00:00 2001 From: neptune Date: Sat, 17 Jul 2021 16:10:27 -0400 Subject: Fixed IPv6 --- cgi/weabot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cgi/weabot.py b/cgi/weabot.py index e17a224..38efa7c 100755 --- a/cgi/weabot.py +++ b/cgi/weabot.py @@ -412,7 +412,7 @@ class weabot(object): # set the board board = setBoard(boarddir) - if board["dir"] not in Settings.EXCLUDE_GLOBAL_BANS: + if Settings.PROXY_BAN and (board["dir"] not in Settings.EXCLUDE_GLOBAL_BANS): if addressIsTor(ip) or addressIsProxy(ip) or addressIsBannedCountry(ip) or not addressIsES(ip): raise UserError, "Proxy prohibido." @@ -734,6 +734,9 @@ class weabot(object): else: host = '.'.join((hosts[-2], hosts[-1])) host = '*.' + host + elif ':' in ip: + iprs = ip.split(':') + host = '%s:%s:%s:%s:*.*.*.*' % (iprs[0], iprs[1], iprs[2], iprs[3]) else: iprs = ip.split('.') host = '%s.%s.*.*' % (iprs[0], iprs[1]) -- cgit v1.2.1-18-gbd029