HeadlinesBriefing favicon HeadlinesBriefing.com

Offline file transfer via QR codes with ShadowCat

Hacker News •
×

GitHub project ShadowCat delivers a fully offline, single‑file HTML app that shuttles data between two devices using only a camera and browser. It targets legacy phones whose Bluetooth, NFC or Wi‑Fi radios no longer function but whose screens still display QR code. Users generate a QR from text, scan it, or send arbitrary files chunked into QR frames.

The transfer protocol prefixes each QR with a simple header—QRX1|H|total|filename|size|crc32—followed by data packets QRX1|D|index|base64. Receivers track indices, discard duplicates, and verify the final CRC before offering a download. At 500 characters per frame and 3 fps, throughput hovers around 0.8 KB/s, so a 100 KB file requires roughly two minutes per transmission loop, and the process repeats until all chunks are received.

Running the page locally requires HTTPS or localhost; plain file URLs deny camera access. A quick Python server (python3 -m http.server 8000) and a LAN address suffice, while iOS Safari demands a valid certificate, achievable with Caddy or a self‑signed cert. Adjusting FPS, ECC level, or chunk size mitigates decoding failures on very old hardware, making the tool a pragmatic bridge for data salvage.