daniellmorris – Daniel L. Morris http://localhost Blog from one of those nerdy types (AKA: Software Engineer) Mon, 07 Oct 2019 14:37:04 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.3 Messing with the amazon button http://localhost/2018/01/messing-with-the-amazon-button/ http://localhost/2018/01/messing-with-the-amazon-button/#respond Wed, 03 Jan 2018 21:57:09 +0000 http://localhost/?p=1 Read more…]]>

I know the amazon button has been around forever but I did this project mainly to mess around with Google’s puppeteer node.js package. This makes so you can very easily purchase any amazon item with the button. Bie

https://github.com/daniellmorris/AmazonButtonNetgearSniffer

Most projects that I have seen for the amazon button require you to sniff network traffic. Truthfully I don’t have the equipment to do that and I knew that I could make do with what I have.

It is very simple to use but it only works with one router. My assumption though is that it would be easy to make it work with another router. You would just have to modify the src/detect.js file.

How it works

It works by periodically pulling a routers log file. This currently only works on theĀ NetgearWRN2000v5 router but I’m sure it could easily be modified to work on other routers. For help on that feel free to contact me.

Steps to use

  1. Make sure you get your amazon button connected to your network but don’t set it up to buy anything.
  2. Setup the router to block all outgoing internet connections for that button
  3. Clone the project.
  4. Run npm install
  5. run “node setup.js”
    1. The script will guide you threw the whole thing. When it detects the push of a button it will bring up a browser window and have you login to amazon and have you go to the correct product page.
    2. It will store the cookies for use later
  6. Run “node listen_and_buy.js”
  7. When a button push is detected it will automatically click the 1-click but button for the product you specified.

Thats it. Have fun. Maybe one day I’ll get creative and put some images in this blog.

 

]]>
http://localhost/2018/01/messing-with-the-amazon-button/feed/ 0