Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +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

Expand Down
4 changes: 2 additions & 2 deletions dashed.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
7 changes: 6 additions & 1 deletion exe/find_dash
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ 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)
capture.setfilter("arp")

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
Expand Down
2 changes: 1 addition & 1 deletion lib/dashed/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Dashed
VERSION = "0.3.0"
VERSION = "0.4.0"
end