Posts Tagged ‘wifi’

Accessing Free Guangzhou Airport Wi-Fi on MacBook Pro

Saturday, December 2nd, 2017

Guangzhou airport has a crazy way of providing free wifi. If you have a Chinese phone you can receive a login account via text, but if you don’t have a Chinese number, then you have to go to a physical ticket machine, scan your passport, and quickly jot down (or photograph) the code that flashes on the screen for 15 seconds.

Once you have this code, you have to click “Ticket Cert” on the login page and enter the info.

This worked fine for me on my iPhone.

But when I tried to follow the same steps on my laptop, the “Ticket Cert” option did not appear on my browser login prompt. I saw a slightly different page that only had the SMS option (and a bunch of half-loaded CSS and javascript errors).

I tried many things including spoofing the UserAgent on my browser. Nothing seemed to work.

Finally, I changed the MAC address on my laptop to match my already-online iphone’s

ifconfig en0 ether [iphone's "Wi-Fi Address"]

This worked.

PS: So far, I have not managed to get any sort of vpn, proxy or ssh tunnelling to work.

Free wifi at Charles de Gaulle airport on laptop

Wednesday, December 25th, 2013

The Charles de Gaulle airport in Paris offers limited free wifi for mobile devices. To use this on your laptop just open your browser and go to the mobile start page: mobile site

I found this by switching my browser to use the iPhone user agent and opening a random page.

Share internet (via wifi Airport) applescript

Sunday, July 17th, 2011

Here’s an applescript we’ve been using at home to share the ethernet internet connection between our two laptops. The computer with the ethernet cord plugged in runs this script, then the other computer can connect to the wireless network of that computer’s name and share its internet connection.


tell application "System Preferences"
	activate
end tell

tell application "System Events"
	tell process "System Preferences"
		click menu item "Sharing" of menu "View" of menu bar 1
		delay 2
		tell window "Sharing"
			if value of checkbox 1 of row 11 of table 1 of scroll area 1 of group 1 is 1 then
				click checkbox 1 of row 11 of table 1 of scroll area 1 of group 1
				click checkbox 1 of row 11 of table 1 of scroll area 1 of group 1
			end if
			
			
			click checkbox 1 of row 11 of table 1 of scroll area 1 of group 1
			delay 1
			if (exists sheet 1) then
				if (exists button "Turn AirPort On" of sheet 1) then
					click button "Turn AirPort On" of sheet 1
					delay 1
				end if
				click button "Start" of sheet 1
			end if
		end tell
	end tell
	tell application "System Preferences" to quit
end tell

Downloads

ShareInternet.app (zip) Here’s a version wrapped into an app with a nice little icon so you can put it on your dock.

List of all hex words: words using only letters a through f

Sunday, October 18th, 2009

I used this ruby one-liner


ruby -e "puts File.readlines('List of English Words.txt').find_all{|word| word =~ /^[abcdef]+\n$/i}"

and a file containing a large list of English words (and acronyms) to make the following list of English words that only use “hex letters” or letters a through f.

A
AAA
ABA
ABC
AC
ADA
Ab
Ababa
Abba
Abe
Ada
Adad
Adda
Ade
B
BCD
Bab
Bee
Beebe
C
CA
CAD
CB
CDC
CDF
Caca
D
DC
DEC
Dacca
Dada
Dade
De
Deb
Dec
Decca
Dee
E
EBCD
Ecca
Ed
Edda
F
FAA
FCC
FDA
Faba
Fabaceae
Fe
Feb
a
aa
ab
aba
abac
abaca
abaff
abb
abba
abbe
abc
abed
ac
acca
accede
acceded
ace
aced
ad
ada
adad
add
adda
added
ade
adead
ae
aface
afaced
afb
afd
aff
affa
b
ba
baa
baaed
baba
babe
bac
bacaba
bacca
baccae
bad
bade
bae
baff
baffed
bb
bcd
be
bea
bead
beaded
bebed
bed
bedad
bedded
bede
bedead
bedeaf
bee
beebee
beef
beefed
c
ca
cab
caba
cabda
cad
cade
caeca
cafe
caffa
cc
cd
cdf
ce
ceca
cede
ceded
cee
cf
d
dB
da
dab
dabb
dabba
dabbed
dace
dad
dada
dade
dae
daff
daffed
db
dc
dca
dcb
de
dead
deaf
deb
dec
decad
decade
dee
deed
deeded
deedeed
deface
defaced
e
ea
ebb
ebbed
ebcd
ecad
ecb
ed
edda
edea
ef
eff
efface
effaced
f
fa
facade
facaded
face
faced
fad
fade
faded
fae
faff
fe
feb
fed
fee
feed
feeded

Perhaps you can use these to make your WEP wifi password easier to rattle off to your guests.

Applescripted airport connection

Monday, August 31st, 2009

My university uses a closed network connection available in all its buildings. To connect on my Mac I have to set up a a network each time. This only entails

  1. Clicking on the airport symbol
  2. Selecting Other...
  3. Typing in the network name
  4. Selecting LEAP
  5. Entering my username and password

The wireless on my older mac laptop is some what weak so repeating these few steps is tedious and worth script (only my username is ever remembered even after repeated connections).

Here’s a script to connect to a hard-coded network with a hard-coded username (the password of course is not hard-coded):


property passwd : ""
set network_name to "NYU-ROAM2"
set user_name to "abc123"
set results to do shell script "airport -s " & network_name
if results does not start with "No scan results for network" and results is not equal to "No networks found" then
	set passwd to text returned of (display dialog "Username:
" & user_name & "
Password:" default answer passwd default button 2 with icon 2 with title "Airport Roam-o-matic" with hidden answer)
        set results to do shell script "airport -A" & network_name & " --password=\"<" & user_name & "/" & passwd & ">\" 2>&1"
        if results starts with "Error" then
                display dialog "Could not connect to " & network_name & ".

Probably the password you entered did not match your username: " & user_name & "." buttons {"OK"} default button 1 with icon 0 with title "Airport Roam-o-matic"
        end if
else
        display dialog network_name & " network not found." buttons {"OK"} default button 1 with icon 0 with title "Airport Roam-o-matic"
end if

Note: My network lets me fake a LEAP username and password using this <username/password> WEP password.

Note: For more general use just replace the first two lines with:


set network_name to text returned of (display dialog "Enter the network name:" default answer "" default button 2 with icon 2 with title "Airport Roam-o-matic")
set user_name to text returned of (display dialog "Enter your username:" default answer "" default button 2 with icon 2 with title "Airport Roam-o-matic")

Update: I added passwd as a property so that it is remembered. Also, I made the prompt contain the username and look a little prettier.

Note: If you get an error like sh: airport: command not found, then you’ll need to run this in Terminal.app:


sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport