![]() |
|
|
Command-line LAWN The usual method for logging into lawn is via a web browser — Firefox, Mozilla, Internet Explorer, etc. Users access and submit an HTML form containing their GT Account username and password, and are subsequently logged into LAWN. If an automated method for logging into LAWN is desired, the solution is to automate a web client — that is, to use a command line tool to HTTP POST user credentials to the same action URL as the HTML form on the LAWN login page. Two popular command line HTTP tools are curl (available from: http://curl.haxx.se/ ) and GNU wget (available from http://www.gnu.org/software/wget/wget.html ). Instructions on using both curl and wget to log into LAWN are presented below. IMPORTANT NOTES:
Logging into LAWN involves passing the following form fields via wget or curl: Required Fields:
Optional Fields:
The output argument is optional. If no argument is given, output=web is assumed. Examples :: Assuming your account name is gb01 and your password is b@dD00d, you want to use Inbound Service Security, and you want to see the output as text (each example is to be typed on one line): curl -s -f -F username='gb01' -F password='b@dD00d' -F iss='true' -F output='text' https://auth.lawn.gatech.edu/index.php or wget -q -O - --post-data='username=gb01&password=b@dD00d&iss=true&output=text' https://auth.lawn.gatech.edu/index.php
curl -s -f --data '@lawnlogin' https://auth.lawn.gatech.edu/index.php or wget -q -O - --post-file=lawnlogin https://auth.lawn.gatech.edu/index.php
curl -s -f -F username='gb01' -F password='b@dD00d' -F iss='true' or wget -q -O - --post-data='username=gb01&password=b@dD00d&iss=true&output=text&mac=9a:18:f2:06:19:71' https://auth.lawn.gatech.edu/index.php If you wish to check the status of your login to LAWN — that is, to see if you are still logged into LAWN (from the device you are currently ON) — you can use wget or curl, and using the same output options as above (but no username or password): curl -s -f https://auth.lawn.gatech.edu/login_status.php?output=text or wget -q -O - https://auth.lawn.gatech.edu/login_status.php?output=text
curl -s -f -F username='gb01' -F password='b@dD00d' or wget -q -O - --post-data='username=gb01&password=b@dD00d&output=text&mac=9a:18:f2:06:19:71' https://auth.lawn.gatech.edu/login_status.php
You are logged out of LAWN when your machine fails to renew its DHCP lease (presumably because you've shutdown, put your machine to sleep, or you are out of range of the wireless network). If you want to log out of LAWN manually, you can access: curl -s -f https://auth.lawn.gatech.edu/logout.php?output=text or wget -q -O - https://auth.lawn.gatech.edu/logout.php?output=text |
||||||||||||
|