From 45eeca41b6c74dfee4b42d0f872ba9fe76bc0138 Mon Sep 17 00:00:00 2001 From: Flipez Date: Mon, 5 Sep 2016 17:29:33 +0200 Subject: [PATCH 1/5] Allow multiple mac prefixes Enhance find_dash script to recognize different Dash versions With the current array the newer version of Amazon's Dash Buttons are working Signed-off-by: Flipez --- exe/find_dash | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/exe/find_dash b/exe/find_dash index ff000f9..4fe28eb 100755 --- a/exe/find_dash +++ b/exe/find_dash @@ -4,6 +4,11 @@ require 'pcaprub' require_relative '../lib/dashed/packet' interface = ARGV[0] +DASH_PREFIX = ['74::74', '44:65'] + +def valid_prefix? mac + !!DASH_PREFIX.any? { |p| mac.start_with? p } +end if interface capture = PCAPRUB::Pcap.open_live(interface, 65535, true, 0) @@ -11,7 +16,7 @@ if interface capture.each_packet do |raw_packet| packet = Dashed::Packet.new(raw_packet) - if packet.host_mac_address.start_with? "74:75" + if valid_prefix?(packet.host_mac_address) puts "Potential Amazon Dash Button #{packet.host_mac_address}" end end From a079bceecf72731e0c9bf9eb7a80f2d17815ce9d Mon Sep 17 00:00:00 2001 From: Flipez Date: Mon, 5 Sep 2016 17:31:58 +0200 Subject: [PATCH 2/5] Newer generation is now supported Signed-off-by: Flipez --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 7ee039d..417c955 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,6 @@ thread. ## Known Issues - Buttons can not be sniffed out on some OS X machines - - Some buttons seem to have a different version of the Amazon Dash button software that render them useless for this. ## Contributing From facfa6f209530feaffc8e5121f3aa9980a7987d6 Mon Sep 17 00:00:00 2001 From: Flipez Date: Mon, 5 Sep 2016 17:36:40 +0200 Subject: [PATCH 3/5] Update gemspec Signed-off-by: Flipez --- dashed.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashed.gemspec b/dashed.gemspec index 2bb91e0..8b49316 100644 --- a/dashed.gemspec +++ b/dashed.gemspec @@ -6,8 +6,8 @@ require 'dashed/version' Gem::Specification.new do |spec| spec.name = "dashed" spec.version = Dashed::VERSION - spec.authors = ["Justin Kenyon", "Blake Williams"] - spec.email = ["kenyonj@gmail.com", "blake@blakewilliams.me"] + spec.authors = ["Justin Kenyon", "Blake Williams", 'Robert Müller'] + spec.email = ["kenyonj@gmail.com", "blake@blakewilliams.me", 'code@brauser.io'] spec.summary = %q{Library for interacting with Amazon Dash buttons} spec.description = %q{Library for interacting with Amazon Dash buttons} From 776e16cc98988801df35c91d7bdcc963aaa4d716 Mon Sep 17 00:00:00 2001 From: Flipez Date: Mon, 5 Sep 2016 17:36:50 +0200 Subject: [PATCH 4/5] Bump version Signed-off-by: Flipez --- lib/dashed/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dashed/version.rb b/lib/dashed/version.rb index 7aab108..0a4aa66 100644 --- a/lib/dashed/version.rb +++ b/lib/dashed/version.rb @@ -1,3 +1,3 @@ module Dashed - VERSION = "0.3.0" + VERSION = "0.4.0" end From c2d93da859c5136d8a26bad3a4e4d3c0a1a1dbf0 Mon Sep 17 00:00:00 2001 From: Flipez Date: Mon, 5 Sep 2016 17:44:04 +0200 Subject: [PATCH 5/5] Fix unnecessary line in README.md Signed-off-by: Flipez --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 417c955..14d6336 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,6 @@ thread. ## Known Issues - Buttons can not be sniffed out on some OS X machines - software that render them useless for this. ## Contributing