Skip to content

Instantly share code, notes, and snippets.

@joshskidmore
Created December 22, 2017 20:15
Show Gist options
  • Save joshskidmore/36c8dc2498585d7a7a403741112422f0 to your computer and use it in GitHub Desktop.
Save joshskidmore/36c8dc2498585d7a7a403741112422f0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# automatically authenticate at a "Google Starbucks" location
mac=$(cat /sys/class/net/wlp*/address)
ap=$(ip neigh|grep "$(ip -4 route list 0/0|cut -d' ' -f3) "|cut -d' ' -f5|tr '[a-f]' '[A-F]')
curl \
-X POST \
--header "host: sbux-portal.appspot.com" \
--form-string "apname=$ap" \
--form-string "clmac=$mac" \
http://74.125.21.153/submit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment