prashanthyalamaddil
v1.0.2
Published
Cinematic Black Hat / White Hat interactive terminal experience by Prashanth Yalamaddi.
Maintainers
Readme
prashanthyalamaddil
A cinematic Black Hat / White Hat interactive CLI card and terminal experience by Prashanth Yalamaddi.
Works seamlessly on Windows Terminal, Windows PowerShell, Linux, and macOS (Node.js 18+).
npx prashanthyalamaddilAdaptive Half-Screen & Full-Screen UI
Instead of hijacking your entire terminal with a full-screen alternate buffer, the CLI renders a sleek framed console card inline (roughly half-screen height in maximized terminals so your scrollback stays intact) and dynamically switches layouts live whenever you resize:
[FULL](≥100×26): Centered half-screen console card (96×23), full 3-pane intro (hexdump|net-scan|core), spacious welcome banner, and full side-by-side Black Hat / White Hat art.[HALF-W](64–99cols): 2-pane intro (net-scan|core) with a live scrolling bottomhexticker strip and scaled hats.[HALF-H](≥82cols,<26rows — e.g., VS Code bottom panel): 2-column horizontal dashboard (Black Hat / White Hat on the left,code>box on the right; menu on the left, output panel on the right).[COMPACT](<64cols or<22rows): Tight single-deck HUD.
What It Does
- Typed Prompt & Spacious Welcome Splash — Realistic human-paced shell typing (with a fixed typo), an expanding cyber horizon line, and a clean staggered WELCOME / PRASHANTH / YALAMADDI reveal with a brushed-chrome light sheen.
- Hollywood 3-Pane Split-Screen Intro (100% pure theatre):
- Flashing alert strip (
booting toolkit→scanning perimeter→ blinkingTARGET LOCKED/FIREWALL BYPASScountdown →ROOT ACCESS GAINED) - Left
hexdumppane with scrolling hex rows - Center
net-scanpane with ASCII progress bar (stalling once near 86%) and dmesg-style logs using only RFC 5737 example targets (203.0.113.0/24) - Right
corepane with simulated link to Prashanth Home PC & Server, RTX 5070 16GB VRAM & 64GB DDR5 RAM loading (READY), model routing (NEXUS-9),tok/s, context bar, GPU/CPU bars, thermals/wattage, and scrolling sparkline
- Flashing alert strip (
- Black Hat vs White Hat Terminal Animation & Choice — Both pixel-art fedoras glide in from opposite edges with motion trails and specular hatband gleams, then come alive with interactive hover-lift and ambient shimmer (truecolor → 256-color → plain ASCII
B/Wfallback):- White Hat (Clean Build) — Always open, no code needed.
- Black Hat (The Back Room) — Locked until a valid 6-digit authenticator TOTP code (
±130s window) or permanent backup code (PY-XXXX-XXXX-XXXX-XXXX) is entered. Three wrong tries trigger a fake counter-trace animation and a 30-second lockout.
- Interactive Centered Menus — Numbered lines (
[1],[2], …,[b] back,[0] exit) navigable with both arrow keys and number/letter keys.
Flags
| Flag | Description |
| --- | --- |
| --fast | Skip the intro animations and jump straight to the Black Hat / White Hat screen |
| --no-color | Disable ANSI colors and render plain ASCII fallback (also respects NO_COLOR) |
| -h, --help | Show CLI usage |
| -v, --version | Print package version |
If stdout/stdin is not a TTY (e.g., piped output), the CLI prints a short plain welcome message and exits 0.
Customizing Text, Links & Telemetry
All user-facing copy, welcome text, menu options, links, and simulated rig/telemetry defaults (fakeModelName, fakeRig) live in src/config/content.js. Edit that file without touching any rendering or auth logic.
Authentication Setup (Black Hat)
Local Mode (default)
Generate a random 160-bit TOTP secret (with terminal QR code + otpauth:// URI for Google/Microsoft Authenticator) and a high-entropy permanent backup code (PY-XXXX-XXXX-XXXX-XXXX, ~82.7 bits):
npm run setup-auth- Scan the printed QR code into Google Authenticator or Microsoft Authenticator.
- Save the permanent code immediately — it is printed once and stored only as a salted
scrypthash (verified withcrypto.timingSafeEqual).
Remote Mode (Recommended for Private Content)
SECURITY WARNING: Everything published inside an npm package is publicly readable by anyone who downloads the tarball. In
"local"mode, thetotp.secretandpermanentCodeHashlive insidesrc/config/auth.config.json, which means a curious user inspectingnode_modulescould read the TOTP secret or inspect static Black Hat menu text.If Black Hat protects anything genuinely private, use
"remote"mode so verification happens on your own HTTPS server and secrets never enter the npm package:
node scripts/setup-auth.js --remote https://your-domain.example/api/verifyYour endpoint receives POST JSON { "code": "..." } and should return HTTP 200 with { "ok": true } (or HTTP 401 with { "ok": false }). Only src/auth/remote.js performs authentication network calls.
Safety Guarantee
- Everything inside
src/effects/**andsrc/art/**is pure offline theatre — nonet,dns,http,https,child_process, orfetch. - Only reserved RFC 5737 documentation IP ranges (
203.0.113.0/24,198.51.100.0/24,192.0.2.0/24) are ever displayed. - No
postinstallor install lifecycle scripts exist inpackage.json. - Enforced automatically via
npm test(test/safety.test.js).
Local Development & Publishing
# 1. Run tests
npm test
# 2. Configure Black Hat TOTP & permanent backup code
npm run setup-auth
# 3. Test locally (full intro and fast mode)
node bin/cli.js
node bin/cli.js --fast
# 4. Inspect package contents before publishing
npm pack --dry-run
# 5. Check if the package name is available on npm
npm view prashanthyalamaddil
# 6. Log in and publish publicly
npm login
npm publish --access publicLicense
MIT — Made by Prashanth Yalamaddi.
