diff options
author | neptune | 2021-07-17 16:10:27 -0400 |
---|---|---|
committer | neptune | 2021-07-17 16:10:27 -0400 |
commit | 3693f572b119cf172be0f669313bdb8314cbbdc2 (patch) | |
tree | 4a95710f8455dade062025af08a16b75fd05ad97 /cgi | |
parent | d8c54cd177536c9077325b7c159f88a12b2a2a68 (diff) | |
download | weabot-3693f572b119cf172be0f669313bdb8314cbbdc2.tar.gz weabot-3693f572b119cf172be0f669313bdb8314cbbdc2.tar.xz weabot-3693f572b119cf172be0f669313bdb8314cbbdc2.zip |
Fixed IPv6
Diffstat (limited to 'cgi')
-rwxr-xr-x | cgi/weabot.py | 5 |
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]) |