How defuse/crackstation-rust works
crackstation-rust is a web application for looking up plaintext preimages of submitted hashes, alongside informational pages and downloadable wordlists. A visitor submits hashes to the home-page handler; it verifies reCAPTCHA and delegates cracking to the preimage-backed oracle, then returns results. The request dispatcher resolves registered pages, builds request context, and records hit counts. The README documents the lookup dependency and wordlist capability; unsampled implementation details are represented only at supported directory-level paths, and edges without explicit evidence are omitted.
Main entry points: registered_page_handler.rs Page dispatcher · main.rs HTTP server · app_state.rs Application state · phpcount.rs Hit counter
Components 19
Web request handling
- HTTP server
src/main.rs - URL canonicalization
src/middleware/url_canonicalization.rs - Page dispatcher
src/registered_page_handler.rs - Page registry
src/registry/pages.rs - Page handler contract
src/handler.rs - Request context
src/context.rs - Security middleware
src/middleware/security_headers.rs
Hash lookup
- Hash submission page
src/pages/home.rs - Hash cracking
src/cracking.rs - Preimage crate
- Hash indexes
dev
Site content
- Informational pages
src/pages - Wordlist downloads
static/downloads - Page templates
templates/pages
State and integrations
- Application state
src/app_state.rs - Hit counter
src/libs/phpcount.rs - MySQL database
- Google reCAPTCHA
Other components
- Visitor
Connections 18
- Visitor → HTTP server: sends requests
README.md - HTTP server → URL canonicalization: applies middleware
src/main.rs - HTTP server → Page dispatcher: routes page requests
src/main.rs - HTTP server → Security middleware: applies middleware
src/main.rs - Page dispatcher → Page registry: resolves paths
src/registered_page_handler.rs - Page dispatcher → Page handler contract: dispatches methods
src/registered_page_handler.rs - Page dispatcher → Request context: builds context
src/registered_page_handler.rs - Page dispatcher → Hit counter: records hits
src/registered_page_handler.rs - Page dispatcher → Application state: reads state
src/registered_page_handler.rs - Page registry → Page handler contract: registers handlers
src/registry/mod.rs - Hash submission page → Hash cracking: requests cracking
src/pages/home.rs - Hash cracking → Preimage crate: looks up hashes
README.md - Preimage crate → Hash indexes: reads indexes
- Hash submission page → Google reCAPTCHA: verifies submissions
- Application state → Hit counter: holds service
src/app_state.rs - Hit counter → MySQL database: reads and writes
src/libs/phpcount.rs - Application state → Preimage crate: holds oracle
src/app_state.rs - Visitor → Wordlist downloads: downloads lists
README.md