Hi, I somehow managed to make a REPL / SHELL that works over SSL, which basically looks like this :
It still NEEDS WebREPL enabled for the initial logging and after that the SSL REPL is initiated ("os.dupterm" on a ssl wrapped socket).
Right now with client authentication only, since server authentication in MicroPython is still missing? (At least esp32 port).
Sadly for esp8266 SSL seems to be not fast enough (I've just manage to make the handshake which took quite a bit and after that it just freezes )
However I made the exactly same (90%) REPL/SHELL working over WebREPL and Serial (so esp8266 and pyboard works too)
This is included in last version of upydev, so to install and read more about it see the README/DOCS: SSLWebREPL docs
It is still a WIP, but I think is ready for some testing
Cheers
SSL(Web)REPL + SHELL
SSL(Web)REPL + SHELL
Last edited by cgglzpy on Mon Jan 20, 2020 5:39 pm, edited 1 time in total.
Re: SSL(Web)REPL + SHELL
This looks very promising! I'm tired of all the insecure protocols everywhere... Thanks for sharing!
Re: SSL(Web)REPL + SHELL
Hi, thanks
I forgot to mention that file transfer (get/put commands) are also done over SSL and SHELL / REPL comes with all sort of autocompletions
Also I think this opens the door to a future Websocket Secure implementation of WebREPL maybe? Although I don't know if anyone is interested in this...
Anyway if anyone is interested in how the SHELL / REPL is made have a look at this awesome library : https://python-prompt-toolkit.readthedocs.io/en/master/
I forgot to mention that file transfer (get/put commands) are also done over SSL and SHELL / REPL comes with all sort of autocompletions
I don't know if this is "secure" or not, but I guess it is a step towards this direction.
Also I think this opens the door to a future Websocket Secure implementation of WebREPL maybe? Although I don't know if anyone is interested in this...
Anyway if anyone is interested in how the SHELL / REPL is made have a look at this awesome library : https://python-prompt-toolkit.readthedocs.io/en/master/