mirror of
https://github.com/BluTac10/Xbox-Neo.git
synced 2026-05-31 15:24:38 +00:00
Python-based bot tool that rapidly connects/disconnects to the server using the full LCE protocol (PreLogin, Login, cipher handshake, identity tokens, keepalive). Configurable concurrent bots, hold times, burst joins, movement packets, and duration. Includes batch files for common test scenarios (basic, aggressive, movement, burst, endurance).
LCE Server Stress Test
Rapid bot connect/disconnect cycles to stress test server thread safety.
Requirements
- Python 3.10+
pycryptodome(only if server has cipher enabled)
pip install pycryptodome
Usage
# Basic: 50 cycles, 8 concurrent bots, 2-10s hold time
python stress_test.py 127.0.0.1 19132
# Aggressive: rapid join/leave with short hold times
python stress_test.py 127.0.0.1 19132 --bots 12 --hold 0.5 2 --ramp 0.2
# With movement packets (tests "moved wrongly" code path)
python stress_test.py 127.0.0.1 19132 --move --hold 5 15
# Burst mode: 4 bots join simultaneously
python stress_test.py 127.0.0.1 19132 --burst 4 --hold 1 3
# Run for 5 minutes continuously
python stress_test.py 127.0.0.1 19132 --cycles 0 --duration 300
# Quiet mode (only shows stats, no per-bot messages)
python stress_test.py 127.0.0.1 19132 --quiet
What it tests
- Player list thread safety: Rapid add/remove from the players vector
- Socket write races: Disconnect while server is mid-write
- Movement validation:
--moveflag sends position packets that trigger "moved wrongly" checks - Concurrent join/leave:
--burstflag joins multiple bots at once
Options
| Option | Default | Description |
|---|---|---|
--bots N |
8 | Max concurrent bot connections |
--cycles N |
50 | Total connect/disconnect cycles (0 = infinite) |
--hold MIN MAX |
2 10 | Random hold time range before disconnect (seconds) |
--ramp SECS |
0.5 | Delay between spawning bots |
--move |
off | Send movement packets while connected |
--burst N |
1 | Bots to spawn simultaneously per cycle |
--duration SECS |
0 | Time limit (0 = run until cycles complete) |
--quiet |
off | Only show periodic stats, not per-bot logs |