
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
A client library for sending and managing SMS messages via the SMS Gateway for Android API
This is a Python client library for interfacing with the SMS Gateway for Android API.
Optional:
pip install android_sms_gateway
You can also install it with the preferred HTTP client:
pip install android_sms_gateway[requests]
pip install android_sms_gateway[aiohttp]
pip install android_sms_gateway[httpx]
With encrypted messages support:
pip install android_sms_gateway[encryption]
Here's an example of using the client:
import asyncio
import os
from android_sms_gateway import client, domain, Encryptor
login = os.getenv("ANDROID_SMS_GATEWAY_LOGIN")
password = os.getenv("ANDROID_SMS_GATEWAY_PASSWORD")
# encryptor = Encryptor('passphrase') # for end-to-end encryption, see https://sms-gate.app/privacy/encryption/
message = domain.Message(
"Your message text here.",
["+1234567890"],
)
def sync_client():
with client.APIClient(
login,
password,
# encryptor=encryptor,
) as c:
state = c.send(message)
print(state)
state = c.get_state(state.id)
print(state)
async def async_client():
async with client.AsyncAPIClient(
login,
password,
# encryptor=encryptor,
) as c:
state = await c.send(message)
print(state)
state = await c.get_state(state.id)
print(state)
print("Sync client")
sync_client()
print("\nAsync client")
asyncio.run(async_client())
There are two client classes: APIClient
and AsyncAPIClient
. The
APIClient
is synchronous and the AsyncAPIClient
is asynchronous. Both
implement the same interface and can be used as context managers.
There are two groups of methods:
Messages
send(message: domain.Message) -> domain.MessageState
: Send a new SMS message.get_state(_id: str) -> domain.MessageState
: Retrieve the state of a previously sent message by its ID.Webhooks
get_webhooks() -> list[domain.Webhook]
: Retrieve a list of all webhooks registered for the account.create_webhook(webhook: domain.Webhook) -> domain.Webhook
: Create a new webhook.delete_webhook(_id: str)
: Delete a webhook by its ID.The API clients abstract away the HTTP client used to make requests. The library includes support for some popular HTTP clients and tries to discover them automatically:
You can also implement your own HTTP client that conforms to the http.HttpClient
or ahttp.HttpClient
protocol.
Contributions are welcome! Please submit a pull request or create an issue for anything you'd like to add or change.
This library is open-sourced software licensed under the Apache-2.0 license.
FAQs
A client library for sending and managing SMS messages via the SMS Gateway for Android API
We found that android-sms-gateway 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.