From 83c0ff9420eb745bde20fa2a714ca057e4d5baf5 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 4 Jun 2023 23:31:46 +0100 Subject: [PATCH] refine rptl --- hotspot_proxy_v2.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hotspot_proxy_v2.py b/hotspot_proxy_v2.py index a3fc81e..93489e4 100644 --- a/hotspot_proxy_v2.py +++ b/hotspot_proxy_v2.py @@ -218,8 +218,10 @@ class Proxy(DatagramProtocol): self.rptlTrack[host] += 1 if self.rptlTrack[host] > 20: + print('(RPTL) exceeded max: {}'.format(self.rptlTrack[host])) _bltime = nowtime + 600 self.IPBlackList[host] = _bltime + self.rptlTrack.pop(host) if self.clientinfo: print('(RPTL) Add to blacklist: host {}. Expire time {}'.format(host,_bltime)) @@ -437,6 +439,7 @@ if __name__ == '__main__': RPTLTRACK = {} print('Purge RPTL table') + if Stats == True: stats_task = task.LoopingCall(stats)