Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
putt is a node.js module that lets you easily output text in lots of fun ways. It wraps a bunch of other libraries to make this as simple as possible.
var putt = require("putt");
putt().speak("This is spoken aloud by your computer");
putt().desktop_notify("This appears as a desktop notification");
Supported output formats:
First, install Node.JS and NPM. Then, cd
into your project folder and run:
npm install putt
For speak
to work on Linux, install Festival and see what voices you have available (e.g. voice_rab_diphone
).
For desktop_notify
to work, install:
growlnotify
extranotify-send
with sudo apt-get install libnotify-bin
or equivalentAll output types take an options hash (optional), e.g.:
putt().speak("I am talking", {voice: "Bruce"});
All output types also have two optional callbacks that can be chained:
done()
is called when the output finishes outputtingerror(reason)
is called when an error is encountered during outputFor example:
putt().speak("I am talking").done(function() {
console.log("Finished talking");
}).error(function(reason) {
console.log("Something went wrong:", reason);
});
Note that you can chain these method calls in any order:
putt().done(function() {
console.log("Finished talking");
}).speak("I am talking");
putt().speak("This is spoken");
Options:
voice
the voice to use when speaking.See say.js docs for a full list of voices
putt().desktop_notify("This is a desktop notification");
Options:
title
the title of the notification windowname
the name of the applicationpriority
(integer) the priority of the notification (default is 0)sticky
(boolean) if notification should fade away or notimage
custom image to show along with notificationSee node-growl docs for more details
putt().post({param1: "value1", param2: "value2"}, {url: 'http://example.com/whatever'});
Options:
url
(required) the URL to POST toheaders
a hash of HTTP headers to be sentSee restler docs for more details
By default, email assumes that the sender is a Gmail user.
putt({
user: 'sender@gmail.com',
pass: 'sender_password'
}).email("Body of email", {to: 'recipient@example.com', subject: 'yo'});
Options:
to
(required) the recipient email addresssubject
the subject for the emailhost
the SMTP hostport
(integer) the SMTP portssl
(boolean) whether or not to use SSLSee nodemailer docs for more details
First, create a new Twitter application, and under the "Settings" tab, you will also want to give your app "Read and write" permissions so that we can write a tweet. Then, click the button at the bottom of the "Details" tab to generate an access token and secret.
Next, provide those keys and secrets to putt when you call it:
putt({
consumer_key: "your consumer key",
consumer_secret: "your consumer secret",
access_token: "your access token",
access_token_secret: "your access token secret"
}).tweet("This text will be tweeted by your account");
FAQs
easily output text in lots of fun ways (speech, growl, email, ...)
The npm package putt receives a total of 0 weekly downloads. As such, putt popularity was classified as not popular.
We found that putt 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.