aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar neptune 2021-07-17 16:10:27 -0400
committerLibravatar neptune 2021-07-17 16:10:27 -0400
commit3693f572b119cf172be0f669313bdb8314cbbdc2 (patch)
tree4a95710f8455dade062025af08a16b75fd05ad97
parentd8c54cd177536c9077325b7c159f88a12b2a2a68 (diff)
downloadweabot-3693f572b119cf172be0f669313bdb8314cbbdc2.tar.gz
weabot-3693f572b119cf172be0f669313bdb8314cbbdc2.tar.xz
weabot-3693f572b119cf172be0f669313bdb8314cbbdc2.zip
Fixed IPv6
-rwxr-xr-xcgi/weabot.py5
1 files changed, 4 insertions, 1 deletions
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])