
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
twitter-node
Advanced tools
Creates a streaming connection with twitter, and pushes any incoming statuses to a tweet event.
Depends on ntest.
Use NPM:
npm install twitter-node
Otherwise create a symlink in ~/.node_libraries
$ ln -s /path/to/twitter-node/lib/twitter-node ~/.node_libraries/twitter-node
TwitterNode emits these events:
See the streaming API docs for examples of the limit and delete commands.
// twitter-node does not modify GLOBAL, that's so rude
var TwitterNode = require('twitter-node').TwitterNode
, sys = require('sys')
// you can pass args to create() or set them on the TwitterNode instance
var twit = new TwitterNode({
user: 'username',
password: 'password',
host: 'my_proxy.my_company.com', // proxy server name or ip addr
port: 8080, // proxy port!
track: ['baseball', 'football'], // sports!
follow: [12345, 67890], // follow these random users
locations: [-122.75, 36.8, -121.75, 37.8] // tweets in SF
});
// adds to the track array set above
twit.track('foosball');
// adds to the following array set above
twit.follow(2345);
// follow tweets from NYC
twit.location(-74, 40, -73, 41)
// http://apiwiki.twitter.com/Streaming-API-Documentation#QueryParameters
twit.params['count'] = 100;
// http://apiwiki.twitter.com/Streaming-API-Documentation#Methods
twit.action = 'sample'; // 'filter' is default
twit.headers['User-Agent'] = 'whatever';
// Make sure you listen for errors, otherwise
// they are thrown
twit.addListener('error', function(error) {
console.log(error.message);
});
twit
.addListener('tweet', function(tweet) {
sys.puts("@" + tweet.user.screen_name + ": " + tweet.text);
})
.addListener('limit', function(limit) {
sys.puts("LIMIT: " + sys.inspect(limit));
})
.addListener('delete', function(del) {
sys.puts("DELETE: " + sys.inspect(del));
})
.addListener('end', function(resp) {
sys.puts("wave goodbye... " + resp.statusCode);
})
.stream();
// We can also add things to track on-the-fly
twit.track('#nowplaying');
twit.follow(1234);
// This will reset the stream
twit.stream();
See http://apiwiki.twitter.com/Streaming-API-Documentation. Keep these points in mind when getting ready to use TwitterNode in production:
Copyright (c) 2010 rick. See LICENSE for details.
FAQs
node.js stream API for the twitter streaming HTTP API
The npm package twitter-node receives a total of 1 weekly downloads. As such, twitter-node popularity was classified as not popular.
We found that twitter-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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 RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.