My gym forced a social media down my throat. So I reverse-engineered its app sha...
HN Best 200 @best
My gym forced a social media down my throat. So I reverse-engineered its app shayon.work · 66 points · 67 comments · HN thread
TL;DR A blogger was annoyed that his gym's check-in app opens to a social feed of member gym selfies and prompts users to post workout stories. He reverse-engineered the app's rotating QR code (Flutter/Dart, AES-128-CTR plus a checksum, keys pulled from a plain-text log on a rooted phone) and built a web app that generates valid codes locally, which worked at the turnstile. The HN thread is split between admiration for the hack and debate over phone dependence, gym social media, and whether AI-assisted reverse engineering makes such posts less interesting.
- The gym app's home screen is a social feed that prompts members to post a story after checking out, which the author found intrusive given his refusal to use social media for over 12 years.
- The check-in QR code is a URL with an encoded account handle, an AES-128-CTR encrypted expiry timestamp, a nonce and a checksum, and it rotates every 15 seconds.
- The app kept working offline for a number of days, so codes could be generated locally once the keys were known.
- The keys were found in a plain-text request/response log on a rooted Android phone; the author used DeepSeek for most of the work, with GLM costing far more in tokens for less progress.
- Pitfalls included expiry in milliseconds rather than seconds, base64url encoding with padding, and a hand-rolled AES implementation that passed round-trip tests but was wrong, caught by comparing against WebCrypto.
- The author says the generated codes were byte-identical to the original app's output and the prototype worked at the gate; he withheld identifying details to protect his membership.
Discussion The thread spends much of its time on the broader issue of being forced to carry a smartphone to enter a gym, rather than on the technical details. Commenters share examples of QR-only entry, banks and venues requiring apps, and alternatives like NFC keyfobs and wallet passes. A recurring side debate is whether the author's ad-blocking counts as stealing, and a smaller one asks whether AI-assisted hacking posts are still interesting. The mood is mixed: amused and admiring of the hack, but skeptical or annoyed at the author's tone and at the spread of mandatory apps.
- Mandatory phone-based access is a dystopian trend (many): Several commenters argue that needing a smartphone for everyday access, from gyms to banks to events, is a worrying loss of choice. Others reply that a phone is already effectively essential and the real problem is surveillance and data use, not the device itself.
- Push back with management or choose another gym (some): Some suggest asking staff for a non-app alternative, or simply switching gyms, since a business that forces an app can be voted with one's membership. Others note that a QR option can be useful for 24/7 access.
- Impressed by the reverse engineering and LLM-assisted work (many): Many praise the hack as real hacking and cite the brute-force value of LLMs for tedious reverse-engineering tasks. Some note that Android wallet apps and Apple Wallet passes offer simpler solutions for the same goal.
- Tired of AI-assisted hacking write-ups (some): A few say the detective-work appeal is gone when the story is simply pointing an AI model at a problem. Others reply that the hack is still a fun read regardless of how it was done.
- Blocking ads in a paid app is not stealing (some): Commenters argue that a paying member taking nothing from the gym by skipping its social feed is not theft, though a few say ignoring ads still undermines the business model.
- The author seems insufferable or too absolutist (a few): A minority find the blog's tone preachy and the social media stance extreme, comparing it to someone who must avoid every trigger, while others say the complaint about forced social features is fair.
Links from the comments