From 9d5d3722cca41b85ad67a6f55cb899ec6209bbb1 Mon Sep 17 00:00:00 2001 From: Christian Zufferey Date: Sun, 24 Nov 2019 23:41:30 +0100 Subject: [PATCH] =?UTF-8?q?Mon=20parser=20regexp=20pour=20r=C3=A9cup=C3=A9?= =?UTF-8?q?rer=20les=20arguments=20de=20mes=20requ=C3=AAtes=20GET=20dans?= =?UTF-8?q?=20wifi=5Fset=5Fconf.html=20ne=20fonctionne=20pas=20:-(?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WIFI_sniffer/cret_project/_zremote_cmd.txt | 9 +++- WIFI_sniffer/cret_project/wifi_config.html | 26 ----------- WIFI_sniffer/cret_project/wifi_get_conf.html | 44 ++++++++++++++++++ WIFI_sniffer/cret_project/wifi_set_conf.html | 48 ++++++++++++++++++++ WIFI_sniffer/cret_project/z_index.html | 4 +- 5 files changed, 102 insertions(+), 29 deletions(-) delete mode 100644 WIFI_sniffer/cret_project/wifi_config.html create mode 100644 WIFI_sniffer/cret_project/wifi_get_conf.html create mode 100644 WIFI_sniffer/cret_project/wifi_set_conf.html diff --git a/WIFI_sniffer/cret_project/_zremote_cmd.txt b/WIFI_sniffer/cret_project/_zremote_cmd.txt index 8a30e81..9c83754 100644 --- a/WIFI_sniffer/cret_project/_zremote_cmd.txt +++ b/WIFI_sniffer/cret_project/_zremote_cmd.txt @@ -1,5 +1,5 @@ # Quelques commandes remote (luatool) à envoyer avec le plugin Atom-IDE-terminal de l'éditeur Atom -# zf191124.1644 +# zf191124.2340 # si luatool ne marche pas sur le MAC, il faut lire ceci: # https://docs.google.com/document/d/1q64uK3IMOgEDdKaIAttbYuFt4GuLQ06k3FLeyfCsWLg/edit#heading=h.bmefcu67uwj0 @@ -67,6 +67,12 @@ zsort_rssi() zshow() ./luatool.py --ip $zIP:$zport -f b.lua ./luatool.py --ip $zIP:$zport -f web_srv2.lua ./luatool.py --ip $zIP:$zport -f z_index.html + + +./luatool.py --ip $zIP:$zport -f wifi_get_conf.html +./luatool.py --ip $zIP:$zport -f wifi_set_conf.html + + ./luatool.py --ip $zIP:$zport -f z_page1.html ./luatool.py --ip $zIP:$zport -f z_page2.html ./luatool.py --ip $zIP:$zport -f z_page3.html @@ -77,6 +83,7 @@ zsort_rssi() zshow() ./luatool.py --ip $zIP:$zport --delete wifi_cli_start.lua ./luatool.py --ip $zIP:$zport --delete dir.lua ./luatool.py --ip $zIP:$zport --delete initz.lua +./luatool.py --ip $zIP:$zport --delete wifi_conf.lua diff --git a/WIFI_sniffer/cret_project/wifi_config.html b/WIFI_sniffer/cret_project/wifi_config.html deleted file mode 100644 index 65ff56c..0000000 --- a/WIFI_sniffer/cret_project/wifi_config.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - WIFI config - - - -

WIFI config 191124.2229

-
- Coucou c'est WIFI config !
- Retour à la home page...


- -La température est: - -<% -ztemp=ztemp+1 -zout(ztemp.."°C") -%> - -
Mais il fait encore trop froid !
- - - - diff --git a/WIFI_sniffer/cret_project/wifi_get_conf.html b/WIFI_sniffer/cret_project/wifi_get_conf.html new file mode 100644 index 0000000..f652300 --- /dev/null +++ b/WIFI_sniffer/cret_project/wifi_get_conf.html @@ -0,0 +1,44 @@ + + + + + + WIFI get config + + + +

WIFI get config 191124.2333

+
+ Coucou c'est WIFI get config !
+ Retour à la home page...


+ +
+ + + + + + + + + + + + + +
AP:
PASSWD:
Entrer YES:
+ +
+
+ + +<% +ztemp=ztemp+1 +zout(ztemp.."°C") +%> + +
Mais il fait encore trop froid !
+ + + + diff --git a/WIFI_sniffer/cret_project/wifi_set_conf.html b/WIFI_sniffer/cret_project/wifi_set_conf.html new file mode 100644 index 0000000..2aaee74 --- /dev/null +++ b/WIFI_sniffer/cret_project/wifi_set_conf.html @@ -0,0 +1,48 @@ + + + + + + WIFI set config + + + +

WIFI set config 191124.2334

+
+ Coucou c'est WIFI set config !
+ Retour à la home page...


+ + + +<% + + if (vars ~= nil) then + zout("
vars: "..vars.."

") + for k, v in string.gmatch(vars, "(%w+)=(%w+%p+%w+)&*") do + _GET[k] = v + zout(k..": "..v.."
") + end + end + + zout("
toto
") + +--[[ +zout("t1: ",_GET.zssid,"
") +zout("t2: ",_GET.zpasswd,"
") + +if zverif == "YES" then + zout("c'est tout bon") + zout("Le SSID est: ",zssid) + zout("Le PASSWD est: ",zpasswd) +end +]] + +ztemp=ztemp+1 +zout(ztemp.."°C") +%> + +
Mais il fait encore trop froid !
+ + + + diff --git a/WIFI_sniffer/cret_project/z_index.html b/WIFI_sniffer/cret_project/z_index.html index 8bb8df2..df41ad5 100644 --- a/WIFI_sniffer/cret_project/z_index.html +++ b/WIFI_sniffer/cret_project/z_index.html @@ -7,7 +7,7 @@ -

ESP8266 home page 191124.2228

+

ESP8266 home page 191124.2332

Différentes pages HTML:

Page 1, affichage de la température dynamique en code Lua inline.
@@ -16,7 +16,7 @@ Page 4, test de récupération d'arguments pour un web service.
API HUB Temp,test d'un web service hub de mesures de température.
Affichage des températures, affiche les températures mesurées.
- WIFI configuration.
+ WIFI configuration.

Page qui n'existe pas !