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.
Get and cache raw tweets from one or more specific twitter feeds. Optionally filter the tweets by hashtag!
Birdwatch will help you grab tweets from specific twitter accounts, and cache the tweets on your server, thus avoiding any request limits set by the Twitter API, and giving you more control over the data that is saved. You can filter tweets by hashtags, or ignore retweets!
Note: This is a work in progress. Pull requests welcome!
Step 1: Install the package via npm
$ npm install --save birdwatch
Step 2: Add your twitter app credentials to the configuration file
node_modules/birdwatch/birdwatch-config.js
local-config.js
var Birdwatch = require('birdwatch');
var birdwatch = new Birdwatch()
.feed('gulpjs')
.feed('reactjs', {filterTags: /#reactjs/i})
.feed('nodejs', {filterTags: /#nodejs/i, removeRetweets:true})
.start();
// Now get your tweets in JSON format to serve or print
birdwatch.getCachedTweets();
If birdwatch can't find an html
string on the returned tweet data, then it adds one for you using tweet-patch.
This means the plain-text hashtags, user-mentions and hyperlinks are converted to twitter-ready HTML. Example below.
cached_tweets[0].text;
//=> "This is the #plaintext tweet"
cached_tweets[0].html;
//=> "This is the <a href="https://twitter.com/hashtag/plaintext">#plaintext</a> tweet"
Type: object
Options set here will override the defaults in the constructor.
Type: Number
Default: 600
The number of seconds to wait before the cache updates again. The default is 10 minutes (600 seconds)
Tip: Update your cache frequently, but not frequently enough to hit any Twitter API Rate Limits.
Type: Boolean
Default: false
Shows a pretty-printed update to the console. Useful for debugging and logging.
Type: boolean
Default: false
Use the test tweet data instead of making a network requests. Useful for testing/debugging.
Type: function
Override the custom sorting function. Birdwatch defaults sorting to chronological order.
Add a twitter feed.
Required
Type: string
The screenname of the twitter account you want to watch.
Type: object
Feed options.
Type: Regex|Array
The regular expression containing the tags you want to filter with, or an array of strings. For example, both of these values will result in the same filter:
.feed('user1', {filterTags: /#01|#02/gi })
.feed('user2', {filterTags: ['01','02'] })
Tip: If you need help writing your regular expressions, try regexpal.com
Type: boolean
Default: false
Use this if you want to remove retweets from the feed you are watching.
Start the Birdwatch process.
Use this to access the birdwatch cache of tweets in the JSON format
Returns: Array
1.0
release, which means some subtle API changes have occurred:
.start()
and .getCachedTweets()
no longer return a Promise.MIT @ Michael Wuergler
FAQs
Monitor, filter, cache and serve specific twitter feeds.
The npm package birdwatch receives a total of 4 weekly downloads. As such, birdwatch popularity was classified as not popular.
We found that birdwatch demonstrated a not healthy version release cadence and project activity because the last version was released 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.