def priv_options(): gen.login_refresh() gen.print_header(': Private Browsing') priv = gen.currval('PRIVACY_MODE') priv = priv.replace('"','') priv = priv.replace('\n','') if priv.upper() != 'ON': print '\ <p>No privacy options available\ ' return print '\ <form action="done.py" method="post">\ <input type = hidden name="key" value = "privacy" />\ \ How long do you want private browsing enabled?\ <input type=radio name="dur" value="5">5 minutes\ <input type=radio name="dur" value="15">15 minutes\ <input type=radio name="dur" value="30">30 minutes\ \ <p><input type="submit" value="Submit" id="submit"/>\ </form>\ ' gen.print_footer() print '\
def priv_options(): gen.login_refresh() gen.print_header(': Private Browsing') priv = gen.currval('PRIVACY_MODE') priv = priv.replace('"', '') priv = priv.replace('\n', '') if priv.upper() != 'ON': print '\ <p>No privacy options available\ ' return print '\ <form action="done.py" method="post">\ <input type = hidden name="key" value = "privacy" />\ \ How long do you want private browsing enabled?\ <input type=radio name="dur" value="5">5 minutes\ <input type=radio name="dur" value="15">15 minutes\ <input type=radio name="dur" value="30">30 minutes\ \ <p><input type="submit" value="Submit" id="submit"/>\ </form>\ ' gen.print_footer() print '\
def action(): key = form['key'].value if key == 'login': login() return if gen.login_check() == False: gen.login_redirect() else: gen.print_header() if key == 'wifi': wifi() if key == 'privacy': privacy() if key == 'passwd': passwd() gen.print_footer() print '\
#!/usr/bin/env python import cgi import cgitb import gen cgitb.enable() if gen.login_check() == False: gen.login_redirect() else: gen.login_refresh() gen.print_header(': Web Password') print '\ <form action="done.py" method="post">\ <input type = hidden name="key" value = "passwd" />\ \ <p>Old password <input type="password" name="opass" />\ <p>New password <input type="password" name="npass1" />\ <p>Re-enter new password <input type="password" name="npass2" />\ \ <p><input type="submit" value="Submit" id="submit"/>\ </form>\ ' gen.print_footer() print '\ </html>\ '
print '\ <form action="done.py" method="post">\ <input type = hidden name="key" value = "wifi" />\ \ What type of encryption?\ <input type=radio name="newenc" value="None" %s >None\ <input type=radio name="newenc" value="WEP" %s >WEP\ <input type=radio name="newenc" value="WPA" %s >WPA\ <input type=radio name="newenc" value="WPA2" %s >WPA2\ \ <p>New Name for Wireless Network (Current Name: %s) <input type="text" name="essid" />\ \ <p>New Passphrase (Current passphrase: %s) <input type="text" name="pass" />\ \ <p><input type="submit" value="Submit" id="submit"/>\ </form>\ ' % ( noenc, wepenc, wpaenc, wpa2enc, curressid, currpass, ) gen.print_footer() print "\ </html>\ "