Files
NodeMCU_Lua/WIFI_sniffer/cret_project/oldies/_zremote_cmd.txt

74 lines
1.6 KiB
Plaintext

# Quelques commandes remote (luatool) à envoyer avec le plugin Atom-IDE-terminal de l'éditeur Atom
# zf191028.1918
# si luatool ne marche pas sur le MAC, il faut lire ceci:
# https://docs.google.com/document/d/1q64uK3IMOgEDdKaIAttbYuFt4GuLQ06k3FLeyfCsWLg/edit#heading=h.bmefcu67uwj0
# raccourcis clavier
# CTRL+ALT+ENTER envoie au terminal la ligne de l'éditeur
# SHIT+CTRL+` ouvre le terminal (attention, ne pas oublier de copier le *path* dans le *tree* et le changer)
# ALT+CMD+F bascule entre le terminal et l'éditeur
# définitions à faire AVANT !
export luatool_tty="/dev/cu.wchusbserial1410"
export zIP="192.168.43.230"
# ouvrir et fermer (ALT+n+.) une session telnet sur le NodeMCU avec l'adresse zIP)
telnet -rN $zIP
~.
node.restart()
=node.heap()
# commandes lua pour ce projet
verbose=true
verbose=false
#commandes luatool pour ce projet
./luatool.py --ip $zIP -f 0_get_data.lua
./luatool.py --ip $zIP -f 0_send_data.lua
./luatool.py --ip $zIP -f cat.lua
~.
./luatool.py --ip $zIP -f head.lua
telnet -rN $zIP
dofile("head.lua")
zhead("telnet_srv2.lua")
./luatool.py --ip $zIP --zrestart
# faire un cat d'un fichier sur le NodeMCU
dofile("cat.lua")
cat("boot2.lua")
# commandes luatool
./luatool.py -h
./luatool.py --ip $zIP -i
./luatool.py --ip $zIP -l
./luatool.py --ip $zIP -f toto.lua -d
./luatool.py --ip $zIP --delete toto.lua
# création des tunnels ssh
ATTENTION: dans un premier terminal !
ssh -t -L 2323:localhost:2323 ubuntu@www.zuzutest.ml ssh -N -L 2323:192.168.1.111:23 ubuntu@localhost -p 20221
ATTENTION: dans un deuxième terminal !
export zIP="localhost"
export zport="2323"
telnet -rN $zIP $zport
~.
node.restart()
=node.heap()
.