Skip to main content

Command-line arguments

All arguments are passed to game/main_game.py.
ArgumentDefaultDescription
--windowed(fullscreen)Run in a 1200×800 window instead of fullscreen.
--host <IP>10.12.73.251IP address of the listener machine.
--bg(disabled)Background mode — launches a headless reverse shell with no pygame window.

Examples

# Run in a window
python game/main_game.py --windowed

# Point at a different listener host
python game/main_game.py --host 192.168.56.1

# Headless shell only (no game UI)
python game/main_game.py --bg --host 192.168.56.1

Network configuration

SettingValue
Default listener IP10.12.73.251
Default port5050 (hardcoded in ReverseShell.__init__)
Connection timeout5.0 seconds (socket.settimeout(5.0))
Retry delay on failure2 seconds
Heartbeat interval15 seconds

How to change the listener IP

1

Find your listener machine's IP

On the machine running tools/listener.py, run:
ip addr show
# or
ifconfig
Note the IP on the interface shared with the game VM (typically a host-only adapter).
2

Pass the IP to the game

python game/main_game.py --host 192.168.56.1
The game connects to 192.168.56.1:5050.
The port 5050 cannot be changed via a CLI flag — it is hardcoded in ReverseShell.__init__. To use a different port you would need to edit the source directly and update tools/listener.py to match.

Background mode

Passing --bg skips all pygame initialization and launches only the reverse shell component. The game connects to the listener and provides a fully functional shell, but no game window appears. This is useful for:
  • Demonstrating the shell mechanism without running the full game.
  • Automated lab exercises where the UI is not needed.
Background mode still establishes a real reverse shell and installs persistence. All the same safety precautions apply. See Lab Environment.

Gameplay constants reference

These values are defined in the game source and control the feel and difficulty of each session.

Player

ConstantValue
Movement speed6 px/frame
Starting health100 HP
Damage per enemy collision15 HP

Enemies

ConstantValue
Max enemies — Level 16 (8% spawn chance)
Max enemies — Level 48 (5% spawn chance)

Screen shake

EventShake magnitude
Bullet fired5
Enemy killed10
Player damaged20

Levels & scanning

ConstantValue
Terminal interaction range80 px
Level 1 scan speed1.2/frame
Level 4 scan speed0.4/frame
Target FPS60
Scan speed decreases with level number — higher levels require you to hold position near terminals for longer, increasing difficulty.

Build docs developers (and LLMs) love