wip
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Quelques commandes remote (luatool) à envoyer avec le plugin Atom-IDE-terminal de l'éditeur Atom
|
||||
# zf191108.1751
|
||||
# zf191124.1644
|
||||
|
||||
# si luatool ne marche pas sur le MAC, il faut lire ceci:
|
||||
# https://docs.google.com/document/d/1q64uK3IMOgEDdKaIAttbYuFt4GuLQ06k3FLeyfCsWLg/edit#heading=h.bmefcu67uwj0
|
||||
@@ -13,6 +13,7 @@
|
||||
cd /Users/zuzu/Desktop/NodeMCU/NodeMCU_Lua/WIFI_sniffer/cret_project
|
||||
export luatool_tty="/dev/cu.wchusbserial1410"
|
||||
export zIP="192.168.0.122"
|
||||
export zIP="192.168.0.137"
|
||||
export zport="23"
|
||||
|
||||
cd '/Users/zuzu/Google Drive/FamilleZ Share/FamilleZ/Papa/LUA/NodeMCU ESP8266/NodeMCU_Lua/WIFI_sniffer/cret_project'
|
||||
@@ -48,15 +49,20 @@ zsort_rssi() zshow()
|
||||
#commandes luatool pour ce projet le .137 est à jour avec la nouvelle version du wifi !
|
||||
~.
|
||||
./luatool.py --ip $zIP:$zport -l
|
||||
./luatool.py --ip $zIP:$zport -f dir2.lua
|
||||
|
||||
|
||||
./luatool.py --ip $zIP:$zport -f secrets_wifi.lua
|
||||
./luatool.py --ip $zIP:$zport -f initz.lua
|
||||
./luatool.py --ip $zIP:$zport -f initz.lua -t init.lua
|
||||
./luatool.py --ip $zIP:$zport -f boot.lua
|
||||
./luatool.py --ip $zIP:$zport -f boot2.lua
|
||||
./luatool.py --ip $zIP:$zport -f wifi_init.lua
|
||||
./luatool.py --ip $zIP:$zport -f set_time.lua
|
||||
./luatool.py --ip $zIP:$zport -f wifi_info.lua
|
||||
./luatool.py --ip $zIP:$zport -f c.lua
|
||||
./luatool.py --ip $zIP:$zport -f cat.lua
|
||||
./luatool.py --ip $zIP:$zport -f flash_led_xfois.lua
|
||||
./luatool.py --ip $zIP:$zport -f head.lua
|
||||
|
||||
./luatool.py --ip $zIP:$zport -f b.lua
|
||||
./luatool.py --ip $zIP:$zport -f web_srv2.lua
|
||||
@@ -66,6 +72,13 @@ zsort_rssi() zshow()
|
||||
./luatool.py --ip $zIP:$zport -f z_page3.html
|
||||
./luatool.py --ip $zIP:$zport -f z_page4.html
|
||||
|
||||
./luatool.py --ip $zIP:$zport --delete wifi_ap_start.lua
|
||||
./luatool.py --ip $zIP:$zport --delete wifi_cli_conf.lua
|
||||
./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
|
||||
|
||||
|
||||
|
||||
dofile("wifi_info.lua")
|
||||
--node.restart()
|
||||
|
||||
@@ -1,86 +1,79 @@
|
||||
-- fonction dir() pour calculer le checksum de tous les fichiers sur le NodeMCU !
|
||||
-- fonction dirfile(fichier) pour calculer le checksum d'un seul fichiers sur le NodeMCU !
|
||||
-- fonction dirc() pour calculer le checksum de tous les fichiers sur le NodeMCU !
|
||||
-- fonction filec(fichier) pour calculer le checksum d'un seul fichiers sur le NodeMCU !
|
||||
|
||||
print("\n dir2.lua zf191124.1543 \n")
|
||||
print("\n dir2.lua zf191124.1602 \n")
|
||||
|
||||
function dir2()
|
||||
|
||||
function calc_chksum_file()
|
||||
local name_file = list_files[zcmpt1]
|
||||
print(name_file)
|
||||
local size_file = 1 local chksum_file = 0
|
||||
local f = file.open(name_file, "r")
|
||||
while true do
|
||||
local t = f:read(1) if t == nil then break end
|
||||
chksum_file = chksum_file + size_file * string.byte(t)
|
||||
size_file = size_file + 1
|
||||
if size_file%100 == 0 then uart.write(0,".") end
|
||||
end
|
||||
f:close() print("")
|
||||
zdir[#zdir+1]=name_file..string.rep(" ",24-string.len(name_file)).." : "..size_file..", "..chksum_file
|
||||
zcmpt1 = zcmpt1 + 1
|
||||
zrepeat()
|
||||
function calc_chksum_file()
|
||||
local name_file = list_files[zcmpt1]
|
||||
print(name_file)
|
||||
local size_file = 1 local chksum_file = 0
|
||||
local f = file.open(name_file, "r")
|
||||
while true do
|
||||
local t = f:read(1) if t == nil then break end
|
||||
chksum_file = chksum_file + size_file * string.byte(t)
|
||||
size_file = size_file + 1
|
||||
if size_file%100 == 0 then uart.write(0,".") end
|
||||
end
|
||||
|
||||
function zrepeat()
|
||||
-- if zcmpt1 < #list_files then
|
||||
if zcmpt1 <= 3 then
|
||||
node.task.post(calc_chksum_file)
|
||||
else
|
||||
table.sort(zdir) for i=1, #zdir do print(zdir[i]) end
|
||||
zdir=nil list_files=nil zcmpt1=nil
|
||||
end
|
||||
end
|
||||
|
||||
function dirc()
|
||||
zdir={}
|
||||
list_files={}
|
||||
local pfile = file.list()
|
||||
for k,v in pairs(pfile) do
|
||||
list_files[#list_files+1]=k
|
||||
end
|
||||
|
||||
print(#list_files)
|
||||
zcmpt1 = 1
|
||||
zrepeat()
|
||||
end
|
||||
|
||||
function filec(name_file)
|
||||
print(name_file)
|
||||
local size_file = 1 local chksum_file = 0
|
||||
local f = file.open(name_file, "r")
|
||||
while true do
|
||||
local t = f:read(1) if t == nil then break end
|
||||
chksum_file = chksum_file + size_file * string.byte(t)
|
||||
size_file = size_file + 1
|
||||
if size_file%100 == 0 then uart.write(0,".") end
|
||||
end
|
||||
f:close() print("")
|
||||
print(name_file..string.rep(" ",24-string.len(name_file)).." : "..size_file..", "..chksum_file)
|
||||
end
|
||||
|
||||
function dir()
|
||||
local zdir={}
|
||||
local pfile = file.list()
|
||||
for k,v in pairs(pfile) do
|
||||
zdir[#zdir+1] = k..string.rep(" ",24-string.len(k)).." : "..v
|
||||
end
|
||||
table.sort(zdir) for i=1, #zdir do print(zdir[i]) end
|
||||
size_file=nil chksum_file=nil k=nil
|
||||
end
|
||||
|
||||
function clear_dir()
|
||||
dir=nil dir2=nil dirc=nil filec=nil zrepeat=nil calc_chksum_file=nil
|
||||
end
|
||||
|
||||
dir()
|
||||
print("\nusage:")
|
||||
print(" dir()")
|
||||
print(" dirc()")
|
||||
print(" filec('dir2.lua')")
|
||||
|
||||
f:close() print("")
|
||||
zdir[#zdir+1]=name_file..string.rep(" ",24-string.len(name_file)).." : "..size_file..", "..chksum_file
|
||||
zcmpt1 = zcmpt1 + 1
|
||||
zrepeat()
|
||||
end
|
||||
dir2()
|
||||
|
||||
function zrepeat()
|
||||
if zcmpt1 <= #list_files then
|
||||
-- if zcmpt1 <= 3 then
|
||||
node.task.post(calc_chksum_file)
|
||||
else
|
||||
table.sort(zdir) for i=1, #zdir do print(zdir[i]) end
|
||||
zdir=nil list_files=nil zcmpt1=nil
|
||||
end
|
||||
end
|
||||
|
||||
function dirc()
|
||||
zdir={} list_files={}
|
||||
local pfile = file.list()
|
||||
for k,v in pairs(pfile) do
|
||||
list_files[#list_files+1]=k
|
||||
end
|
||||
zcmpt1 = 1 zrepeat()
|
||||
end
|
||||
|
||||
function filec(name_file)
|
||||
print(name_file)
|
||||
local size_file = 1 local chksum_file = 0
|
||||
local f = file.open(name_file, "r")
|
||||
while true do
|
||||
local t = f:read(1) if t == nil then break end
|
||||
chksum_file = chksum_file + size_file * string.byte(t)
|
||||
size_file = size_file + 1
|
||||
if size_file%100 == 0 then uart.write(0,".") end
|
||||
end
|
||||
f:close() print("")
|
||||
print(name_file..string.rep(" ",24-string.len(name_file)).." : "..size_file..", "..chksum_file)
|
||||
end
|
||||
|
||||
function dir()
|
||||
local zdir={}
|
||||
local pfile = file.list()
|
||||
for k,v in pairs(pfile) do
|
||||
zdir[#zdir+1] = k..string.rep(" ",24-string.len(k)).." : "..v
|
||||
end
|
||||
table.sort(zdir) for i=1, #zdir do print(zdir[i]) end
|
||||
size_file=nil chksum_file=nil k=nil
|
||||
end
|
||||
|
||||
function clear_dir()
|
||||
dir=nil dir2=nil dirc=nil filec=nil
|
||||
zrepeat=nil calc_chksum_file=nil
|
||||
end
|
||||
|
||||
dir()
|
||||
print("\nusage:")
|
||||
print(" dir()")
|
||||
print(" dirc()")
|
||||
print(" filec('dir2.lua')")
|
||||
|
||||
|
||||
--[[
|
||||
dir()
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
|
||||
zz_host_dir2.lua zf191124.1054
|
||||
zz_host_dir2.lua zf191124.1634
|
||||
|
||||
README.md : 2841, 347247457
|
||||
_secrets_energy.lua_ : 574, 14047690
|
||||
_zremote_cmd.txt : 3797, 598457578
|
||||
_zremote_cmd.txt : 4225, 742020960
|
||||
a.lua : 492, 9072034
|
||||
b.lua : 4289, 696634446
|
||||
boot.lua : 451, 8092291
|
||||
boot2.lua : 1581, 89772835
|
||||
c.lua : 1023, 45354296
|
||||
cat.lua : 522, 9721978
|
||||
dir2.lua : 1569, 96054383
|
||||
dir2.lua : 2504, 246241567
|
||||
dir2.lua.zf191124.1436 : 1931, 139164369
|
||||
flash_led_xfois.lua : 1131, 43977377
|
||||
head.lua : 567, 11507510
|
||||
initz.lua : 2159, 175035891
|
||||
@@ -18,8 +20,8 @@ secrets_project.lua : 539, 12833508
|
||||
secrets_wifi.lua : 635, 15410620
|
||||
set_time.lua : 879, 31173858
|
||||
telnet_srv2.lua : 2760, 289194718
|
||||
thost : 40, 43647
|
||||
tnode : 877, 22149116
|
||||
thost : 40, 43773
|
||||
tnode : 1083, 34517179
|
||||
upload_s.sh : 1913, 159132384
|
||||
upload_t.sh : 1618, 109879609
|
||||
web_srv2.lua : 2960, 297644504
|
||||
@@ -30,7 +32,7 @@ z_page1.html : 443, 7731060
|
||||
z_page2.html : 1867, 123937742
|
||||
z_page3.html : 1415, 67091731
|
||||
z_page4.html : 1660, 90364904
|
||||
zz_host_dir2.lua : 1821, 131648152
|
||||
zz_host_dir2.lua : 2020, 162623430
|
||||
|
||||
|
||||
Rappel, sur Atom, sélectionner les deux fichiers à gauche puis CTRL+CMD+C
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
.................initz.lua
|
||||
b.lua : 4289, 696634446
|
||||
boot.lua : 451, 8092291
|
||||
|
||||
boot2.lua : 1581, 89772835
|
||||
c.lua : 1023, 45354296
|
||||
cat.lua : 522, 9721978
|
||||
dir2.lua : 1569, 96054383
|
||||
dir2.lua : 2504, 246241567
|
||||
flash_led_xfois.lua : 1131, 43977377
|
||||
head.lua : 567, 11507510
|
||||
initz.lua : 2159, 175035891
|
||||
init.lua : 2159, 175035891
|
||||
secrets_project.lua : 539, 12833508
|
||||
secrets_wifi.lua : 635, 15410620
|
||||
set_time.lua : 879, 31173858
|
||||
@@ -20,4 +20,3 @@ z_page1.html : 443, 7731060
|
||||
z_page2.html : 1867, 123937742
|
||||
z_page3.html : 1415, 67091731
|
||||
z_page4.html : 1660, 90364904
|
||||
>
|
||||
|
||||
@@ -5,14 +5,15 @@
|
||||
|
||||
-- usage dans la console:
|
||||
-- ./zz_host_dir2.lua
|
||||
-- ./zz_host_dir2.lua > thost
|
||||
|
||||
--[[
|
||||
./zz_host_dir2.lua > thost
|
||||
]]
|
||||
-- usage dans Atom editor
|
||||
-- il faut installer ceci: https://atom.io/packages/compare-files
|
||||
-- puis sélectionner les deux fichiers dans l'explorateur à gauche puis CTRL+CMD+C
|
||||
|
||||
|
||||
print("\n zz_host_dir2.lua zf191124.1109 \n")
|
||||
print("\n zz_host_dir2.lua zf191124.1634 \n")
|
||||
|
||||
function calc_chksum_file(name_file)
|
||||
size_file = 1 chksum_file = 0
|
||||
|
||||
Reference in New Issue
Block a user