diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-05-26 22:34:06 -0400 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-05-26 22:34:06 -0400 |
| commit | d0c909dab1a06f5970216befd2cd0839327914fe (patch) | |
| tree | 3ab3d02855bf7dbae37a922b0d335cc295a52cf1 /boot/app/cgi-bin/index.cgi | |
| parent | 7233b605e9079688c0a18e4491bc317eb88f618d (diff) | |
| download | jasper-client-d0c909dab1a06f5970216befd2cd0839327914fe.tar.gz jasper-client-d0c909dab1a06f5970216befd2cd0839327914fe.zip | |
removed network setup wizard
Diffstat (limited to 'boot/app/cgi-bin/index.cgi')
| -rwxr-xr-x | boot/app/cgi-bin/index.cgi | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/boot/app/cgi-bin/index.cgi b/boot/app/cgi-bin/index.cgi deleted file mode 100755 index bcb85b5..0000000 --- a/boot/app/cgi-bin/index.cgi +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python - -from wifi import * -import os -import cgi -import cgitb; cgitb.enable() # for troubleshooting - -# some housekeeping -print "Content-type: text/html" -print - -# get the form input -form = cgi.FieldStorage() -network = form.getvalue("network", "") -password = form.getvalue("password", "") - -# if not submitted yet, show them the network selection form -if not network: - - wifi = Wifi() - - networks = [x.replace("\n","") for x in wifi.access_points if x.replace("\n","") != "Jasper"] - select_code_split = ["<option value=\"%s\">%s</option>" % (network, network) for network in networks] - select_code = "".join(select_code_split) - - response = open("index-template.html","r").read().replace("{{ select_code }}", select_code) - print response - -# otherwise, show them the password form -elif not password: - response = open("key-template.html","r").read().replace("{{ network }}", cgi.escape(network)) - print response - -# in the final case, process the wifi password and network data -else: - # show the confirmation page - response = open("connecting-template.html","r").read() - print response - - # save the configuration - wifi = Wifi() - wifi.add_wifi(network, password)
\ No newline at end of file |
