Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Readme
Python module to handle micropython websocket (WS) repl protocol (client side only). It is modified original implementation to automatize working with web repl.
Simple example to get output of command:
import webrepl
repl=webrepl.Webrepl(**{'host':'192.168.4.1','port':8266,'password':'ulx3s'})
resp=repl.sendcmd("import os; os.listdir()")
print(resp.decode("ascii"))
Example to get version of webrepl on device:
import webrepl
repl=webrepl.Webrepl(**{'host':'192.168.4.1','port':8266,'password':'ulx3s','debug':True})
ver=repl.get_ver()
print(ver)
It should work with both python2 and python3 with simple pip commands:
pip install webrepl
Few webreplcmd examples:
webreplcmd --host 192.168.4.1 --password ulx3s ls
webreplcmd --host 192.168.4.1 --password ulx3s get src-remote-file.txt dest-local-file.txt
webreplcmd --host 192.168.4.1 --password ulx3s -v get src-remote-file.txt dest-local-file.txt
webreplcmd --host 192.168.4.1 --password ulx3s put src-local-file.txt dest-remote-file.txt
webreplcmd --host 192.168.4.1 --password ulx3s -v put src-local-file.txt dest-remote-file.txt
webreplcmd --host 192.168.4.1 --password ulx3s cat main.py
webreplcmd --host 192.168.4.1 --password ulx3s cmd 'import os; os.listdir()'
webreplcmd --host 192.168.4.1 --password ulx3s rm uftpd.py
Note that you can also specify basic parameters using environment variables:
export WEBREPL_HOST=127.0.0.1
export WEBREPL_PASSWORD=ulx3s
export WEBREPL_PORT=8266
and then you can just specify command:
webreplcmd ls
All options are listed using --help:
webreplcmd --help
It should work with both python2 and python3 with simple pip commands:
sudo apt-get update
sudo apt-get install -y python3 python3-pip
sudo pip3 install webrepl
usage: webreplcmd [-h] [--host HOST] [--port PORT] [--verbose] [--debug]
[--password PASSWORD] [--before BEFORE] [--cmd CMD]
[--after AFTER]
CMD [CMD ...]
webrepl - connect to websocket webrepl
positional arguments:
CMD commands for repl
optional arguments:
-h, --help show this help message and exit
--host HOST, -i HOST Host to connect to
--port PORT, -P PORT Port to connect to
--verbose, -v Verbose information
--debug, -d Enable debugging messages
--password PASSWORD, -p PASSWORD
Password used to connect to
--before BEFORE, -B BEFORE
command to execute before
--cmd CMD, -c CMD command to execute
--after AFTER, -A AFTER
command to execute after
webreplcmd --host 192.168.4.1 --password ulx3s ls
webreplcmd --host 192.168.4.1 --password ulx3s get src-remote-file.txt dest-local-file.txt
webreplcmd --host 192.168.4.1 --password ulx3s put src-local-file.txt dest-remote-file.txt
webreplcmd --host 192.168.4.1 --password ulx3s cat main.py
webreplcmd --host 192.168.4.1 --password ulx3s cmd 'import os; os.listdir()'
FAQs
Handle micropython web_repl
We found that webrepl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).