diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-17 15:17:31 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-17 15:17:31 -0300 |
commit | ae57d4024596e3e26381b14bd556574c9a69ce1e (patch) | |
tree | 41ba04a9e28605e81b91a4c493d246fff4576e91 /consts.py | |
parent | 0f001ee4db66e8154c0405eb2cf4434803fbde1c (diff) | |
download | server-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.py | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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) |