Skip to content

📡 Poll Apple Airport Express base station to see who's online

License

Notifications You must be signed in to change notification settings

wizardishungry/whomst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Whomst

Quick and dirty Sinatra app for SNMP polling an Apple Airport Express base station to see who's online. YMMV

Requirements

  • smnpwalk
  • nmap for MAC prefix database
  • dig for Zeroconf
  • ping to test for host online

Instructions

  1. Make a file called hosts with MAC address or host in the left hand field, then a space and a free-form comment
DE:AD:BE:EF:12:34 Raspberry Pi 1
10.10.42.2 Raspberry Pi 1
DE:AD:BE:EF:12:34 Power Mac G4
DE:AD:BE:EF:12:34	Thinkpad
  1. bundle install
  2. Run ruby app.rb IPADDRESS_OF_AIRPORT and navigate to http:https://localhost:4567/
host ip address mac address vendor comment zeroconf
raspberry pi 1 10.10.32.3 DE:AD:BE:EF:12:34 alfa wireless
raspberrypi.local.
10.10.32.6 DE:AD:BE:EF:12:34 raspberry ethernet
melvin's macbook 10.10.32.8 DE:AD:BE:EF:12:34 apple
melvin.local.
"model=macbookpro3,3" "osxvers=7"
Mac Mini 10.10.32.9 DE:AD:BE:EF:12:34 liteon
Pentium PC! 10.10.32.10 DE:AD:BE:EF:12:34 intel wireless
windowsxp.local.
10.10.32.103 DE:AD:BE:EF:12:34 wistron ethernet
jon iphone 10.10.32.100 DE:AD:BE:EF:12:34 apple
tom iphone 10.10.32.101 DE:AD:BE:EF:12:34 apple
tom imac 10.10.32.102 DE:AD:BE:EF:12:34 apple
tom-imac.local.

Why Ruby?

This should probably be run by cron instead of running in the server. Those slow dig calls could be parallelized with a better language.

TODO

  • Historical info (lastlog)
  • Machines stick around for a long time (DHCP lifetime?)
  • non-DHCP hosts?

About

📡 Poll Apple Airport Express base station to see who's online

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published