
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
asyncio-tcp-messages-team-2
Advanced tools
Установка:
pip install asyncio_tcp_messages_team_2
Пример сервера:
В начале объявляем класс MySocketLib с ip и портом. После чего регистрируем функции, которые вам нужны, для регистраций команды нужно указать декоратор @app.command (Если хотите получить адрес клиента, укажите первым аргументом addr с тайп хитом tuple пример def get_addr(addr: tuple))
import asyncio
from asyncio_tcp_messages_team_2.main import MySocketLib
app = MySocketLib('127.0.0.1', 8889)
ter = {}
@app.command async def set_data(key: str, val: int): await ter[key] = val
@app.command async def get_data(key: str): return ter[key]
asyncio.run(app.run())
Пример клиента:
import asyncio
async def tcp_client(): reader, writer = await asyncio.open_connection('127.0.0.1', 8889)
while True:
message = input("Send: ") + "\n"
if not message:
break
writer.write(message.encode())
await writer.drain()
data = await reader.readline()
print(data.decode())
print('Close the connection')
writer.close()
async def main(): await asyncio.gather(tcp_client())
if name == 'main': asyncio.run(main())
Пример работы:
set_data --key key val --val 21 12
ok get_data --key key --val 21 12
FAQs
asynchronous joke
We found that asyncio-tcp-messages-team-2 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.