
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@bitrelay/bufio
Advanced tools
Buffer and serialization utilities for node.js and browser.
npm install @bitrelay/bufio
import * as assert from 'assert'
import * as bufio from '@bitrelay/bufio'
const bw = bufio.write()
bw.writeU64(100)
bw.writeString('foo')
const data = bw.render()
const br = bufio.read(data)
assert(br.readU64() === 100)
assert(br.readString(3) === 'foo')
import { BufferReader, BufferWriter, Struct } from '@bitrelay/bufio'
class MyStruct extends Struct {
public str: string
public value: number
constructor(data: Partial<MyStruct> = {}) {
super()
Object.assign(this, data)
}
public static fromReader(br: BufferReader): MyStruct {
const str = br.readVarString('ascii')
const value = br.readU64()
return new this({ str, value })
}
public toWriter(bw: BufferWriter): BufferWriter {
bw.writeVarString(this.str, 'ascii')
bw.writeU64(this.value)
return bw
}
}
const instance = new MyStruct({ str: 'hello', value: 0 })
console.log('Buffer:')
console.log(instance.toBuffer())
console.log('Decoded:')
console.log(MyStruct.fromBuffer(instance.toBuffer()))
console.log('Hex:')
console.log(instance.toHex())
console.log('Decoded:')
console.log(MyStruct.fromHex(instance.toHex()))
console.log('Base64:')
console.log(instance.toBase64())
console.log('Decoded:')
console.log(MyStruct.fromBase64(instance.toBase64()))
If you contribute code to this project, you are implicitly allowing your code
to be distributed under the MIT license. You are also implicitly verifying that
all code is your original work. </legalese>
See LICENSE for more info.
FAQs
Buffer and serialization utilities
The npm package @bitrelay/bufio receives a total of 0 weekly downloads. As such, @bitrelay/bufio popularity was classified as not popular.
We found that @bitrelay/bufio 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.