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.
py-telegram-notifier
Advanced tools
A simple notifier for sending a message to a Telegram chat using the Telegram Bot API.
A simple utilization of the Telegram Bot API for sending messages to a Telegram chat by means of a context manager, function calls, or a CLI.
pip install py-telegram-notifier
In order for the module to function, you must supply it with a bot token, and a chat id. Full instructions on creating a bot can be found here.
Firstly, set up the config for your Notifier. This only has to be done once, assuming you are sending messages from the same bot to the same chat every time.
from telegram_notifier import set_config_options
chat_id = 0000000000 # Your chat id
token = "0000000000" # Your bot token
set_config_options(chat_id=chat_id, token=token)
Then, you may use a Notifier as a context manager that will notify you of the type of exit that was encountered, including whether it finished with or without an error.
from telegram_notifier import Notifier
with Notifier("This is a task."):
# Code that takes a long time.
pass
Save bot information in settings by using:
telegram_notifier --chat_id XXXX --token YYYY
XXXX
the unique identifier for a target chat (chat id).YYYY
the bot token.Send a message to a chat once the settings are saved:
telegram_notifier --message ZZZZ
ZZZZ
the message to send.The author of this software is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Telegram or any of its affiliates and is independently owned and created.
FAQs
A simple notifier for sending a message to a Telegram chat using the Telegram Bot API.
We found that py-telegram-notifier 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.