Educational ATM simulator + RE lab in pure Python stdlib. Synthetic only, 13 HOLD gates.
253
Inside an ATM, in code. An educational ATM simulator and reverse-engineering lab — built from the transparent-ATM model video ("Inside an ATM: How cash actually gets dispensed!") — that shows, step by step, how an ATM verifies a transaction before any cash is allowed to move, then picks, scans, stacks, recounts, presents, settles — or retracts and reverses.
Project name in code: ATM-SimX · Source: https://github.com/kimanicollier44-cmyk/atm-simulation-engine
Pure Python standard library. Zero dependencies. Synthetic only: fake accounts, fake PINs, fake bills, fake firmware, fake dispenser protocol. No real bank network, no real card data, no real cash hardware.
Honest scope: this is a simulator and a teaching / reverse-engineering lab for its own synthetic artefacts. It does not connect to a bank, a payment network, a card reader, or ATM hardware, and it cannot dispense real cash.
bypass_bank_verificationis a permanent HOLD gate — see Owner / operator mode below.
docker pull credkellar/atm-simulation-engine:latest
docker run --rm credkellar/atm-simulation-engine
The image's default command runs the built-in self-check suite. Expected last line:
CHECKS 33/33 ALL PASSED
To run the other demos from the source checkout (Python 3.11+, nothing to install):
python main.py withdraw --amount 500 # Alice (demo PIN 1234) takes $500
python main.py withdraw --amount 200 --no-take # watch it retract + reverse
python main.py withdraw --amount 200 --user bob # Bob (demo PIN 4321, $300 balance)
python main.py operator-test # owner test-dispense + cash count
python main.py re # firmware / protocol / trace / black-box RE
python -m pytest tests/ -q # 19 passed
An ATM is two machines in one box:
Both halves are modelled in one 962-line main.py, with the failure paths included:
HOLD-0001 for $500 is placed. No cash has moved yet, and none can move before this step.Owning an ATM gives you supervisor testing, not a bank-verification bypass — bank verification belongs to the cardholder's bank and the payment network. Modelled here (demo operator code 2468):
ATMX firmware header, extract strings, disassemble its toy bytecode (PICK 100, SCAN, STACK, PRESENT, SETTLE, HALT); bad magic is rejected.STX, cmd, len, payload, LRC, ETX) and catch a tampered frame by its LRC checksum.fewest_bills, cross-checked against brute force.IDLE.live_bank_network · real_cash_hardware · real_card_reader · store_plain_pin · bypass_pin · bypass_bank_verification · override_balance_check · dispense_without_authorization · disable_sensor_checks · disable_recount · open_safe · skip_retract_reversal · exceed_daily_limit
pytest — 19 passedpython main.py checks — CHECKS 33/33 ALL PASSED61883145 on kimanicollier44-cmyk/atm-simulation-engine (main.py, tests, Dockerfile + full-template README pushed at a583aa52, workflows pasted by owner)Python 3.11+ (image uses 3.12-slim) · zero runtime dependencies · no network, API keys or hardware needed (or used) at runtime · Docker only for the container route above.
atm-simulation-engine/
├── main.py # everything in one file (962 lines): bank, dispenser,
│ # protocol, firmware, state machine, HOLD gates,
│ # council seats, RE lab, 33 self-checks, CLI
├── tests/
│ └── test_atm_simx.py # pytest suite (19 tests)
├── Dockerfile # python:3.12-slim, CMD runs the checks suite
├── README.md # full-template README: tech stack, mermaid per script,
│ # 10 cool reasons, 10 problems / solutions, install steps
└── .github/workflows/
├── ci.yml # CI: Python 3.12, pytest, self-checks
└── docker-publish.yml # publishes credkellar/atm-simulation-engine:latest
Synthetic only. Educational. No real bank network, no real card data, no real cash hardware — and bypass_bank_verification stays HOLD, permanently.
docker pull credkellar/atm-simulation-engine:latest