|
|
|
@ -106,17 +106,14 @@ def handle_configure(client, request):
@@ -106,17 +106,14 @@ def handle_configure(client, request):
|
|
|
|
|
<br><br>""" |
|
|
|
|
send_response(client, response_footer) |
|
|
|
|
try: |
|
|
|
|
fo = open("passwd.dat", "r") |
|
|
|
|
with open("passwd.dat", "r") as fo: |
|
|
|
|
ex_data = fo.read() |
|
|
|
|
fo.close() |
|
|
|
|
fo = open("passwd.dat", "w") |
|
|
|
|
ex_data = ssid + ";" + password + "\n" + ex_data |
|
|
|
|
with open("passwd.dat", "w") as fo: |
|
|
|
|
fo.write(ex_data) |
|
|
|
|
fo.close() |
|
|
|
|
except: |
|
|
|
|
fo = open("passwd.dat", "w") |
|
|
|
|
with open("passwd.dat", "w") as fo: |
|
|
|
|
fo.write(ssid + ";" + password + "\n") |
|
|
|
|
fo.close() |
|
|
|
|
return True |
|
|
|
|
else: |
|
|
|
|
response_footer = """ |
|
|
|
|