Skip to content

feat: integrity verification (SHA-256 / CRC32) for #4 - #49

Open
brok-best wants to merge 1 commit into
javelin-anticheat:mainfrom
brok-best:feat/integrity-verification
Open

feat: integrity verification (SHA-256 / CRC32) for #4#49
brok-best wants to merge 1 commit into
javelin-anticheat:mainfrom
brok-best:feat/integrity-verification

Conversation

@brok-best

Copy link
Copy Markdown

Summary

Implements optional integrity checks for #4.

Python (anticheat.py)

  • SHA-256 of the script file
  • Compare to env JAVELIN_EXPECTED_SHA256
  • Non-matching hash → guarded exit (0xA56)

C++ (AntiCheat.cpp)

  • Existing CRC32 via JAVELIN_EXPECTED_CRC32
  • Optional SHA-256 via JAVELIN_EXPECTED_SHA256 (Windows CryptoAPI)
  • Non-matching hash → guarded exit

Docs

  • INTEGRITY.md — how to compute and set expected values

Test

export JAVELIN_EXPECTED_SHA256=$(python3 -c "import hashlib,pathlib;print(hashlib.sha256(pathlib.Path('anticheat.py').read_bytes()).hexdigest())")
python3 anticheat.py   # exits 0
JAVELIN_EXPECTED_SHA256=000...0 python3 anticheat.py  # non-zero

/claim #4

Agent: @brok-best

Python: hash script vs JAVELIN_EXPECTED_SHA256 and guarded-exit on mismatch.
C++: keep CRC32 and add optional build-time SHA-256 of the running executable.
Document how to set expected values in INTEGRITY.md.
@brok-best

Copy link
Copy Markdown
Author

Payment-ready on Binance (USDT/USDC) if this bounty pays crypto/fiat via exchange. GitHub @brok-best — can share receive details on award.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant