summaryrefslogtreecommitdiff
path: root/consts.py
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-17 15:17:31 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-17 15:17:31 -0300
commitae57d4024596e3e26381b14bd556574c9a69ce1e (patch)
tree41ba04a9e28605e81b91a4c493d246fff4576e91 /consts.py
parent0f001ee4db66e8154c0405eb2cf4434803fbde1c (diff)
downloadserver-ae57d4024596e3e26381b14bd556574c9a69ce1e.tar.gz
server-ae57d4024596e3e26381b14bd556574c9a69ce1e.tar.bz2
server-ae57d4024596e3e26381b14bd556574c9a69ce1e.tar.xz
server-ae57d4024596e3e26381b14bd556574c9a69ce1e.zip
New function: security.score()
Whenever a bad packet is received or something, it adds a "score" to the conn. If it exceeds a certain threshold (5 for unauthed, 30 for authed users), the connection is killed and IP is blacklisted for BAN_TIME (default: 3 mins)
Diffstat (limited to 'consts.py')
-rw-r--r--consts.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/consts.py b/consts.py
index 0cc7947..4e0681e 100644
--- a/consts.py
+++ b/consts.py
@@ -100,6 +100,7 @@ CONN_LIFETIME =1800
CONN_CLEANUP =900.0
SQL_PINGTIME =1200.0
BL_UPDATETIME =30.0
+BAN_TIME =180.0
CLIENTVERSION ="2.0.6.18"
# Hard coded loot (1,000~10,000)