
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Python package for controlling Sengled Wifi devices.
NOTE
: This has no relation with Sengled. There's no official API.
Features:
TL;DR The package is based on 3 classes:
SengledWifiLogin
- Takes care of the login (requires credentials), reduces the API calls to a minimum by saving a session cookie locally.SengledWifiMqtt
- Requires a login (SengledWifiLogin), creates the connection to the MQTT server, subscribe to topics and publish updates. Is a wrapper for paho-mqtt.SengledWifiApi
- Uses the other two classes to get/set devices stateSimple example that will subscribe to all the topics related to the devices in the Sengled account. SengledWifiMqtt can also receive callbacks for new messages (will be executed when an update is received).
import logging
import asyncio
from sengledwifipy import SengledLogin, SengledWifiAPI, SengledWifiMQTT
#set this for testing only
logging.basicConfig(level=logging.DEBUG)
def testing():
async def testmqtt():
login = SengledLogin(email = "email@domain.com",password = "verysecure")
await login.login()
devices = await SengledWifiAPI.get_devices(login)
MqttClient = SengledWifiMQTT(login)
await MqttClient.async_connect(devices)
while True:
await asyncio.sleep(60)
return asyncio.run(testmqtt())
testing()
This is a way to update the device state:
SengledWifiAPI.set_device_state(MqttClient,"deviceId",power_on=True, brightness=100)
pipx install poetry
poetry install --with dev
pre-commit install
Inspired by:
FAQs
Python package to control Sengled Wifi Devices Programmatically.
We found that SengledWifiPy 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.