Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
######################################################################## TWX: Abstraction Layer Over Telegram's Bot API and MTProto Chat Potocols ########################################################################
:contributions: Please join https://github.com/datamachine/twx :issues: Please use https://github.com/datamachine/twx/issues :Python version supported: 3.4
TWX is a python interface for the Telegram bot API. It supports making synchronous and asynchronous calls and converts the response into a usable native python object.
Support for the MTProto API is in the works, but considered pre-alpha right now.
For stable:
pip install twx
For dev:
pip install -i https://testpypi.python.org/pypi twx
::
from twx.botapi import TelegramBot, ReplyKeyboardMarkup
"""
Setup the bot
"""
bot = TelegramBot('<API TOKEN>')
bot.update_bot_info().wait()
print(bot.username)
"""
Send a message to a user
"""
user_id = int(<someuserid>)
result = bot.send_message(user_id, 'test message body').wait()
print(result)
"""
Get updates sent to the bot
"""
updates = bot.get_updates().wait()
for update in updates:
print(update)
"""
Use a custom keyboard
"""
keyboard = [
['7', '8', '9'],
['4', '5', '6'],
['1', '2', '3'],
['0']
]
reply_markup = ReplyKeyboardMarkup.create(keyboard)
bot.send_message(user_id, 'please enter a number', reply_markup=reply_markup).wait()
FAQs
Abstraction Layer Over Telegram's Bot API and MTProto Chat Potocols
We found that twx demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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 malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.