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.
This python package requires python >= 3.6 with pip.
python3 -m pip install --upgrade --user twitter_sdk
git clone https://github.com/AdriBloober/TwitterSDK && cd TwitterSDK
python3 setup.py install
Go here (https://developer.twitter.com/en/apps) and create a developer app. Under Tab Keys and tokens
get you'r tokens.
from twitter.api import TwitterApi, TwitterAuth
consumer_key = ""
consumer_secret = ""
access_token_key = ""
access_token_secret = ""
api = TwitterApi(TwitterAuth.get_oauth1_auth(consumer_key, consumer_secret, access_token_key, access_token_secret))
from twitter.api import TwitterApi, TwitterAuth
bearer_token = ""
api = TwitterApi(TwitterAuth.get_oauth2_bearer_token(bearer_token))
from twitter.api import TwitterApi, TwitterAuth
email_address = ""
password = ""
api = TwitterApi(TwitterAuth.get_basic_authentication(email_address, password))
The TwitterApi
object contains all methods.
Here are all rate limits documented: https://developer.twitter.com/en/docs/twitter-api/v1/rate-limits/endpoint-rate-limits.
If the rate limit has been reached, the error twitter.error_management.RateLimitReachedError
will been thrown.
If the response status code is betweet 400 and 599, the twitter.error_management.TwitterError
will been thrown.
import requests
class TwitterError(Exception):
status_message: str
status_code: int
url: str
response: requests.Response
def __init__(self, status_message, status_code, url, response=None):
self.status_message = status_message
self.status_code = status_code
self.url = url
self.response = response
super().__init__(f"Error {status_code}: {status_message} for url {url}.")
FAQs
Communicate with the official twitter api.
We found that twitter-sdk 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
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.