Socket
Book a DemoInstallSign in
Socket

node-slowloris

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-slowloris

helps aliviate slow loris attack by giving developer 2 extra options, 1- headerTimeout, the timeout to receive the headers. 2- minRate the minimum rate (bytes/second) with rateOverhead to compensate for initial delay to receive data

1.0.5
latest
Source
npmnpm
Version published
Weekly downloads
1
-75%
Maintainers
1
Weekly downloads
 
Created
Source

node-slowloris

helps aliviate slow loris attack by giving developer 2 extra options:

1- headerTimeout, the timeout to receive the headers.

2- minRate the minimum rate (bytes/second) with rateOverhead to compensate for initial delay to receive data

NOTE: As there is no event in node for request start, as in before headers not after headers (since slow header is part of slowloris) I cant measure the time since the request started. SO to circumvent that I used the connection event but had to disable keepAlive since otherwise more than one request wil be served in one connection and I cant measure the time since the requests started (as in before headers as above). It would be great if node adds a request start event this way I could measure the time from that event and wont have to disable the keepAlive functionality

  var http = require('http');
  var slowloris = require('slowloris');
  var server = http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.write('Hello World!');
    res.end();
  });
  server.listen(8080);
  slowloris(server, {
    headerTimeout: 5000, // in ms, default 2500
    minRate: 1000,       // bytes per second, default 500
    rateOverhead: 100    // in ms this will be subtracted from the time when calculating the rate, default 50
  });

Keywords

slowloris

FAQs

Package last updated on 13 Jun 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.