
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
byte-range-stream
Advanced tools
Create a multipart/byteranges stream based on passed ranges.
Code heavily inspired by form-data
npm install --save byte-range-stream
const fs = require('fs')
const path = require('path')
const ByteRangeStream = require('byte-range-stream')
const filePath = path.join(__dirname, 'example.js')
const totalSize = fs.statSync(filePath).size
const getChunk = (range) => fs.createReadStream(filePath, {start: range.start, end: range.end})
const byteStream = new ByteRangeStream({
range: 'bytes=0-100',
getChunk,
totalSize,
contentType: 'text/javascript',
})
// Invalid could mean unsupported range type (only "bytes" is supported)
// or incorrect syntax
if (!byteStream.isValid()) {
console.log('Invalid')
}
// Unsatisfiable could mean out of range
if (!byteStream.isSatisfiable()) {
console.log('Unsatisfiable')
}
// You will need the generated boundary for the multipart response,
// as well as content length
const headers = byteStream.getHeaders()
process.stdout.write('206 Partial Content\n\n')
for (const header in headers) {
process.stdout.write(`${header}: ${headers[header]}\n`)
}
process.stdout.write('\n')
byteStream.pipe(process.stdout)
MIT © Espen Hovlandsdal
FAQs
Create a multipart/byteranges stream based on passed ranges
The npm package byte-range-stream receives a total of 172 weekly downloads. As such, byte-range-stream popularity was classified as not popular.
We found that byte-range-stream 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.