Hacker News new | past | comments | ask | show | jobs | submit login

A few years ago when I was a Junior engineer, I worked for a company which would provide us with free tickets to any sports team in our city. I'm not a sports fan, but my stepdad loves hockey. When the tickets went up, they got reserved pretty fast.

I noticed that the site we used to reserve the tickets had a predictable slug like: `{company}-hockey-tickets-2016-season`, and `{company}-hockey-tickets-2015-season`. The sites also didn't change between each refresh.

So, when it was nearly time for the 2017 season to start, I wrote a script which hashed a GET request of the site at `{company}-hockey-tickets-2017-season`. If the hash changed, it would send me a text message using twilio, and I would know to immediately get on a machine and reserve the tickets we wanted. After a couple false positives, the page eventually went up before it was announced and I reserved the tickets I wanted.

Unfortunately, the office manager who did these things told me I couldn't jump the gun and un-reserved my tickets. After the official announcement went up, the spots I had originally reserved quickly went to someone else




Yeah, that office manager probably knew who would be getting the tickets in advance.


Working hard: writing a script to detect when the website goes live.

Working smart: bring the office manager a pastry, ask them about their day, and drop hints about how excited you are for the tickets this year.


Engineer vs Non-Engineer approach.


You mean social engineering.


I'd rather pay scalper prices than do that


And that's when I'd make that script and the knowledge behind it available publicly and advertise it on social media :)


It seems like bad company policy to let a bunch of techies fight over a limited resource via web requests. It's like network inspector gladiators. Maybe that was the point? Lol


Why is the hash of the request better than comparing strings?


I assume they meant they were hashing the response rather than hashing the request. Then you don't have to keep the entire response around for comparison, only its hash.


Content on the page with slug `{company}-hockey-tickets-2016-season` changed, not the slug itself.


I think mhb's point is that the size of the request content is so small, it can be compared byte-for-byte directly instead of hashing and comparing hashes. Many of us have a kind of muscle memory where we always hash everything for comparison, but for small data there is not really a point.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: