Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
This project is based on lightstreamer-client
pip install async-lightstreamer
# or if you are using poetry
poetry add async-lightstreamer
This client creates a task for receving new messages You can pass TaskGroup to LightstreamerClient, and client will use given TaskGroup for creating task
async with asyncio.TaskGroup() as tg:
async_lightstreamer.LightstreamerClient(
lightstreamer_username="<username>",
lightstreamer_password="<password>",
lightstreamer_url="<url>",
adapter_set="<adapter>",
task_group=tg,
)
If you set should_reconnect
flag to true in LightstreamerClient, client will reconnect
and subscribe all subscriptions
async_lightstreamer.LightstreamerClient(
lightstreamer_username="<username>",
lightstreamer_password="<password>",
lightstreamer_url="<url>",
adapter_set="<adapter>",
should_reconnect = True,
reconnect_retries = 100, # set to -1 for infitine retry
)
import asyncio
import async_lightstreamer
async def main():
lc = async_lightstreamer.LightstreamerClient(
lightstreamer_username="<username>",
lightstreamer_password="<password>",
lightstreamer_url="<url>",
adapter_set="<adapter>",
)
await lc.connect()
async def callback(data) -> None:
print(data)
await lc.subscribe(
subscription=async_lightstreamer.LightstreamerSubscription(
mode=async_lightstreamer.Mode.MERGE,
items=["item1", "item2"],
fields=["field1", "field2"],
adapter="adapter",
).addlistener(callback),
)
await asyncio.sleep(60)
await lc.disconnect()
asyncio.run(main())
FAQs
Unknown package
We found that async-lightstreamer 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.