I hacked the Amazon Dash Button to click Meh at meh.com instead of ordering Tide

76

Background

If you're stumbling onto this post from Google or Reddit or Hacker News or wherever, you might not be familiar with meh.com. It's a daily deal site started by the guys who were behind woot.com, eventually sold it to Amazon, then moved on to build meh.com.

Meh.com offers one deal every day. On the homepage you'll find two buttons, "buy it" and "meh". Clicking the "buy it" button obviously leads you into the checkout process. Clicking the "meh" button flips the button over to reveal the meh face of the day.

Meh.com fans try to click the meh button every day to grow their collection. We keep stats on all the meh button clicks. Some users compete to collect them all. Others try to make silly designs. It's like, a thing.

Amazon Dash Button

The Amazon Dash Button is a small device with WiFi, a battery, and a physical button on it. You can buy them from Amazon for $5 and set them up to order certain products from Amazon when they're pressed.

It's a neat idea, but I wanted to see if I could make the Amazon Dash do other things when I pressed the button... like clicking the "meh" button on meh.com.

Standing on the shoulders of giants

What I found out is that, when pressed, the Amazon Dash button sends an ARP request across your network. You can use simple packet capture software to sniff the ARP request as a quick and dirty way to detect when the Amazon Dash button has been pressed.

Lucky for me, a couple of guys already did some of the really hard work. My project uses a nice little Node.js module called node-dash-button from Alex Hortin. His module is based off this excellent article by Ted Bensen.

Getting started

  1. Get an Amazon Dash Button
  2. Follow the instructions to setup your Amazon Dash Button with the Amazon mobile app. Complete the first two steps to connect your Amazon Dash Button on your WiFi network.
  3. Don't complete step three where it asks you "Which product do you want your Dash Button to reorder whenever you click it". Just exit the app.

Discovering your Amazon Dash Button's MAC address

Here's where things get tricky. You're going to need to have Node.js installed and you're going to need to download my meh-dash-button code. From the directory where you downloaded the code run these commands:

  • npm i to install the code's dependencies
  • sudo node app.js find to start listening for ARP requests on your network

The application will start listening for ARP requests on your network and displaying any MAC addresses it finds. If your network is anything like mine you'll see quite a few devices show up. I usually let it run for about a minute so that when I press my Dash button I'm fairly confident I've isolated the Amazon Dash device.

Once you have your Amazon Dash button's MAC address you can quit the program. Update line 4 of the app.js file with your Amazon Dash button's MAC address.

Clicking the meh button

Update line 5-6 of the app.js file with your meh.com username and password. Now that we can detect Amazon Dash button clicks the program uses a web browser automation library called Nightmare to sign you into meh.com and then click the meh button for you.

  • Run the app using this command: sudo node app.js
  • Click the Amazon Dash button
  • Wait a while for Nightmare to do its browser automation
  • Open meh.com in your web browser and you should see the meh button has been clicked for you