> im in ur x, y'ing ur z_ 

c u t u p @ c u t u p . o r g

 xml 

[bash airport wlan homepage] last modified: 03/25/2007 02:06 pm

If you have an Apple laptop with Airport this bash line returns the SSID of the current network:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I | awk '/ SSID/ {printf $2}'

With that in mind i made a smart homepage script in php. I run it on my local webserver and use it as my homepage.

Given a list of trusted SSID's it will test internet connection and:

  1. if connected to a trusted network it will load homepage if connected or display an error if not connected
  2. if connected to another network it will display SSID and connection status
  3. if not connected to a wireless network, show homepage if internet detected (like ethernet or whatever) else display an offline page

There's other ways I could imagine running this, but it should be pretty easy to modify for diferent behavior.




[All Posts] [top]

tags:

airport
bash
homepage
wlan