SSL(Web)REPL + SHELL

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
cgglzpy
Posts: 47
Joined: Thu Jul 18, 2019 4:20 pm

SSL(Web)REPL + SHELL

Post by cgglzpy » Sun Jan 12, 2020 1:43 pm

Hi, I somehow managed to make a REPL / SHELL that works over SSL, which basically looks like this :
Image

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
Last edited by cgglzpy on Mon Jan 20, 2020 5:39 pm, edited 1 time in total.

User avatar
tve
Posts: 216
Joined: Wed Jan 01, 2020 10:12 pm
Location: Santa Barbara, CA
Contact:

Re: SSL(Web)REPL + SHELL

Post by tve » Sun Jan 12, 2020 5:03 pm

This looks very promising! I'm tired of all the insecure protocols everywhere... Thanks for sharing!

cgglzpy
Posts: 47
Joined: Thu Jul 18, 2019 4:20 pm

Re: SSL(Web)REPL + SHELL

Post by cgglzpy » Mon Jan 13, 2020 3:34 pm

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 :)
tve wrote:
Sun Jan 12, 2020 5:03 pm
This looks very promising! I'm tired of all the insecure protocols everywhere... Thanks for sharing!
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... :roll:

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/

Post Reply