thisll probably get u banned
  • C++ 94.4%
  • Rust 4.9%
  • Python 0.4%
  • JavaScript 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-26 15:17:08 +02:00
generated/linux first commit 2026-11-26 11:07:05 +02:00
include first commit 2026-11-26 11:07:05 +02:00
rust triga 2026-11-26 15:17:08 +02:00
tests move to rust 2026-11-26 12:58:43 +02:00
tools move to rust 2026-11-26 12:58:43 +02:00
.gitignore move to rust 2026-11-26 12:58:43 +02:00
AGENTS.md first commit 2026-11-26 11:07:05 +02:00
build.rs move to rust 2026-11-26 12:58:43 +02:00
build.sh move to rust 2026-11-26 12:58:43 +02:00
Cargo.lock move to rust 2026-11-26 12:58:43 +02:00
Cargo.toml move to rust 2026-11-26 12:58:43 +02:00
CMakeLists.txt move to rust 2026-11-26 12:58:43 +02:00
inject.sh first commit 2026-11-26 11:07:05 +02:00
README.md triga 2026-11-26 15:17:08 +02:00

CS2 Linux overlay — Rust

The runtime is a Rust cdylib, with no C++ implementation or Cargo dependencies. It links the installed SDL2, X11, Xext, and libdl libraries. X11/XWayland is required; native Wayland is unsupported.

Build and test

./build.sh

This builds an optimized library, runs Rust unit tests and a native SDL/X11 start/stop/restart integration test, then publishes a uniquely named .so in build/. Run from a graphical X11/XWayland session. Rust/Cargo and the system SDL2/X11 development libraries must already be installed. No package downloads are needed: Cargo runs offline.

The compatibility build path also works:

cmake -S . -B build
cmake --build build
ctest --test-dir build --output-on-failure

Reconfigure CMake before each live build to generate a new output filename. Never overwrite a shared library already mapped into CS2.

Load into running CS2

./inject.sh
# Or select an explicit published build:
./inject.sh "$PWD/build/libcs2_overlay_rust_<build-id>.so"

The injector stops old overlay workers, verifies shutdown, loads the selected library, and verifies its replacement worker. Ctrl+C stops the worker. Libraries remain mapped until game exit; the injector does not call dlclose on them. The Rust port uses explicit late loading; the old LD_PRELOAD/demo workflow has been replaced by the native Rust integration test.

Exported C ABI: overlay_start_live, overlay_start_live_window, overlay_stop_live, overlay_worker_active, and overlay_status.

Controls and settings

  • Right Shift: show/hide the click-through panel.
  • F6: toggle ESP.
  • Up/Down: select an option; Left/Right: change it.
  • Space: autobhop while enabled and the game is focused.
  • Left Alt: hold to activate triggerbot after enabling it in the panel.

Triggerbot defaults to off with an 80 ms target delay (adjustable 0–500 ms). It uses the game's crosshair entity index, checks opposing-team living players, and requires a loaded firearm that is not reloading. Attack is pulsed and owned attack input is released when the hold key is released or the worker stops. It does not perform an additional smoke or wall trace; eligibility follows the game's crosshair index. Actual firing behavior requires live verification.

ESP controls include full/corner/no boxes, separate name/health/distance toggles, an allies toggle independent of aim, and a 0–500 m display limit (0 is unlimited). Health bars change from green to amber to red as health falls. All options persist in overlay.conf and are selectable with the panel's arrow-key controls.

The top-center bomb HUD appears while a planted bomb is ticking. It shows site A/B, seconds until explosion, a countdown bar, and active defuse progress with an IN TIME / TOO LATE indication based on the networked finish times. Invalid timers are hidden; the timer uses Linux GlobalVars curtime at offset 0x30. Countdown validation is unit-tested; an active plant/defuse needs live visual verification. Worker status includes the current detected bomb state.

Aim, ESP, skeleton, and autobhop settings load from overlay.conf. Changes save automatically through a temporary file and rename. The path is embedded at build time so it does not depend on CS2's working directory. Missing/invalid values keep defaults.

Implementation

  • rust/memory.rs: guarded POD reads/writes and ELF module discovery.
  • rust/game.rs, rust/hitboxes.rs: entities, animated model hitboxes, skeletons, local view/recoil data, and server hit-count tracking.
  • rust/visibility.rs: physics mesh/hull extraction and BVH visibility checks.
  • rust/aim.rs: angular mouse conversion, smoothing, and recoil feedforward.
  • rust/input.rs: reversible SDL input-pump dispatch hook for autobhop and main-thread Panorama script dispatch.
  • rust/panorama.rs, rust/panorama.js: in-game HUD drawing through Panorama, with pooled panels/labels, change-only style updates, and latest-frame queuing.
  • rust/x11.rs: window discovery, keyboard/focus queries, mouse input, and an X11 drawing fallback for hosts without validated Panorama signatures.
  • rust/settings.rs: validated persistent settings.
  • rust/lib.rs: worker lifecycle, controls, and rendering orchestration.

build.rs generates Rust offset constants from the existing Linux schema dump; the generated headers remain dump inputs, not compiled C++ code. Provenance is in generated/linux/PROVENANCE.md (dumped game build 14201).

Verification boundaries

Tests cover memory guards, hit-count resets, settings, bone transforms, angular aim math, geometry intersection/BVH, and native resource cleanup across restart. The SDL pump hook is input-pump timing, not a verified command/subtick hook. Static geometry does not reliably represent moving doors, breakables, or smoke. Aim conversion assumes default pitch/yaw scale 0.022 and recoil scale 2. Live worker/status verification is separate from visible ESP, repeated hopping, and firing accuracy. Remaining work is tracked in DONEXT.md.

Native HUD renderer

In CS2, unique validated signatures select Panorama instead of the X11 canvas. This path creates no X11 panel/canvas, pixmap, or shape regions. The worker builds primitive commands; the SDL input callback executes the latest queued frame on the game thread. Panels are reused and unchanged styles are skipped. Shutdown requests deletion of RustNativeOverlay before restoring the input hook. If the game thread does not pump during the 500 ms cleanup window, deletion cannot be confirmed. Libraries remain mapped on shutdown.

overlay_status reports executed/submitted frames and the most recent script execution time. These counters do not measure GPU frame time or prove visual correctness. The native SDL integration test exercises the fallback lifecycle; Panorama requires live CS2 verification. The initial live check verified script execution while game data was unavailable; in-match visuals and FPS comparison remain to be confirmed.