Yesterday, Mailbox released their beta Mac app. One cute thing they did, was that instead of a beta link or code, they distributed cute little animated gif coins which you could then drop into a “tin can” in the app to gain access.
I was intrigued by the concept, so I got some used betacoins from my friends and did a little digging to figure out how they were doing it.
My plan was to diff the coins and see what was changed from coin to coin, but I didn’t even need to do that. A quick inspect with gifsicle revealed an obvious token in the gif comments extension block.
[email protected]:~/Desktop/betacoins âœª gifsicle -I coin113121.gif '#0' * coin113121.gif 122 images logical screen 173x130 global color table  background 44 loop forever + image #0 173x130 transparent 45 comment "F1699622-5500-4F31-B643-798427D0DBFA" disposal asis delay 0.03s [email protected]:~/Desktop/betacoins âœª
From there I checked a couple other coins to see if they had differing comments, and sure enough they did.
So now the question became, could I add the comment from a valid betacoin to another gif and have it still work?
I grabbed a lovely gif of a barfing unicorn off the web, and set to work.
[email protected]:~/Desktop/betacoins âœª gifsicle unicorns_puke_rainbows_by_chronicle_vindictive-d56nvl0.gif --no-comments -c '"F1699622-5500-4F31-B643-798427D0DBFA"' '#0' '#1-' > unicoin.gif [email protected]:~/Desktop/betacoins âœª gifsicle -I unicoin.gif '#0' * unicoin-a.gif 9 images logical screen 660x850 global color table  background 0 loop forever + image #0 660x850 comment "F1699622-5500-4F31-B643-798427D0DBFA" delay 0.92s [email protected]:~/Desktop/betacoins âœª
I then downloaded the beta, crossed my fingers, and dragged the unicoin into the tin can. I was rewarded with a tinkle of a coin dropping in, and access to the beta.
This is a valid betacoin.
Turns out, Mailbox could care less what else is in your gif. Just so long as you have a comment with a valid token, it’ll use that gif and animate it prettily.
As an aside, the coin gif has a staggering 122 frames. 122. Sparkles are expensive, yo.
I created a service for changing up your Mailbox betacoins, called Unicoin. You’re welcome.
Second Edit (2014-08-20)