
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
express-range-tracker
Advanced tools
Detects semantically correct usage of the range
header by firing the onDownloaded
event when all chunks related to the current ip are downloaded
const express = require("express");
const rangeTracker = require("express-range-tracker");
express()
.use(
rangeTracker({
timestampFunction: Date.now,
onDownloaded: (req, res, next) => {
/* ... */
},
})
)
.listen(3000);
timestampFunction
- Calculates datetime of range chunk request
storage
- an Object
that supports indexing, associative array. {}
by default
onDownloaded
- event that behaves as middleware
onDeadlineReached
- event that fires when maxDelay
exceeds timestamp window between the last and the new timestamps
allowedTraits
- array of functions that determine whitelist of range header behavior. true
if match, false
otherwise
interface Trait {
from: number;
to: number;
timestamp: number;
}
(previous: Trait, current: Trait) => boolean;
bannedTraits
- array of functions that determine blacklist of range header behavior. true
if match, false
otherwise
(previous: Trait, current: Trait) => boolean;
onSimilarTrait
- fires when another ips had the same range behavior as the current ip. The current ip will not be in the list
const track = rangeTracker({
storage,
onSimilarTrait: (ips) => {
console.log(ips.length);
},
});
onRobotic
- fires when range is malformed in some way:
malformed
- does not conform to range specdigits
- from
is bigger than to
in range segmentempty
- range header is present but length of string is 0absent
- request of content that should have range header but does not existnegative
- negative from or to range detectedonRobotic(req, reason);
onSimilarTimestamp
- function that fires on clients with same range request timestamp windows
onSimilarTimestamp(req, ips);
onRangeOverflow
- fires with either parts
or overflow
reason when segment count is larger than maxParts
or max
value is smaller than the biggest part of any segment, respectively
const track = rangeTracker({
storage,
maxParts: 3,
max: 50
onRangeOverflow: (req, reason) => {
console.log(reason);
},
});
npm test
FAQs
Detects bots by tracking the timings of range header
The npm package express-range-tracker receives a total of 12 weekly downloads. As such, express-range-tracker popularity was classified as not popular.
We found that express-range-tracker 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.