OXIESEC PANEL
- Current Dir:
/
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
redis
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
09/05/2025 09:36:16 AM
rwxr-xr-x
📄
__init__.py
1.71 KB
03/16/2023 12:57:13 PM
rw-r--r--
📁
__pycache__
-
03/16/2023 12:57:13 PM
rwxr-xr-x
📄
backoff.py
2.61 KB
03/16/2023 12:57:13 PM
rw-r--r--
📄
client.py
71.8 KB
03/16/2023 12:57:13 PM
rw-r--r--
📄
cluster.py
75.87 KB
03/16/2023 12:57:13 PM
rw-r--r--
📁
commands
-
03/16/2023 12:57:13 PM
rwxr-xr-x
📄
connection.py
59.14 KB
03/16/2023 12:57:13 PM
rw-r--r--
📄
crc.py
670 bytes
03/16/2023 12:57:13 PM
rw-r--r--
📄
exceptions.py
4.54 KB
03/16/2023 12:57:13 PM
rw-r--r--
📄
lock.py
10.76 KB
03/16/2023 12:57:13 PM
rw-r--r--
📄
ocsp.py
11.18 KB
03/16/2023 12:57:13 PM
rw-r--r--
📄
retry.py
1.7 KB
03/16/2023 12:57:13 PM
rw-r--r--
📄
sentinel.py
12.4 KB
03/16/2023 12:57:13 PM
rw-r--r--
📄
utils.py
1.51 KB
03/16/2023 12:57:13 PM
rw-r--r--
Editing: crc.py
Close
from binascii import crc_hqx # Redis Cluster's key space is divided into 16384 slots. # For more information see: https://github.com/redis/redis/issues/2576 REDIS_CLUSTER_HASH_SLOTS = 16384 __all__ = ["key_slot", "REDIS_CLUSTER_HASH_SLOTS"] def key_slot(key, bucket=REDIS_CLUSTER_HASH_SLOTS): """Calculate key slot for a given key. See Keys distribution model in https://redis.io/topics/cluster-spec :param key - bytes :param bucket - int """ start = key.find(b"{") if start > -1: end = key.find(b"}", start + 1) if end > -1 and end != start + 1: key = key[start + 1 : end] return crc_hqx(key, 0) % bucket