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.
express-brute-pg
Advanced tools
A PostgreSQL store for express-brute via node-postgres.
via npm:
$ npm install express-brute-pg
express-brute-pg expects a table named brute
(this may be overridden in the constructor) to exist in whatever database you're connecting to.
create table brute(id text primary key, count int, first_request timestamptz, last_request timestamptz, expires timestamptz);
var ExpressBrute = require('express-brute'),
PgStore = require('express-brute-pg');
var store = new PgStore({
host: '127.0.0.1',
database: 'sandbox',
username: 'appuser',
password: 'password'
});
var bruteforce = new ExpressBrute(store);
app.post('/auth',
bruteforce.prevent, // error 403 if we hit this route too often
function (req, res, next) {
res.send('Success!');
}
);
host
Postgres server host name or IP addressdatabase
Database name to connect tousername
Database usernamepassword
Corresponding password, if password authentication is requiredtableName
Include to use a storage table named something other than brute
schemaName
Include if your storage table is in a schema other than public
pool
You may pass in your application's pool
instance to express-brute-pg
to share connection pools or use the native bindings; if not supplied, express-brute-pg
will spin up its own poolFAQs
A PostgreSQL store for express-brute
We found that express-brute-pg 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.