summaryrefslogtreecommitdiff
path: root/git-maintenance/internet-access/san-francisco-ca-el-capitan-hotel-wifi.sh
blob: 2320d1da0e77b5b7250c96fa58cab616b5eef168 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
echo
echo "== Trying to log in to wifi, California, San Francisco, El Capitan Hotel. =="
echo 
echo "== Front desk clerk usually opens door for buzzer. =="
echo
echo "== Script is work in progress =="

parseasciinums() {
	node -e "asciinums=[$1]; for (let c of asciinums) console.log(String.fromCharCode(c));"
}
formaction="$(parseasciinums 47)"
tokvalue="$(parseasciinums 49,97,101,54,102,101,55,53)"
redirvalue="$(parseasciinums 104,116,116,112,58,47,47,103,111,111,103,108,101,46,99,111,109,47)"
vouchervalue=8479

# need url for login.  unchecked work below.
url="$(curl -iI google.com | grep Location: | { read key val; echo "$val"; })"
url="${url%/*}"

# this is hoped to help log in.  try and repair.
curl -v "${url}/${formaction}?tok=${tokvalue}&redir=${redirvalue}&voucher=${vouchervalue}"