Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
CHS addressing is an early method for giving addresses to each physical block of data on a hard disk drive, identifying individual sectors on a disk by their position in a track, where the track is determined by the head and cylinder numbers.
$ npm install --save chs
// Load module
var CHS = require( 'chs' )
// Create a CHS address
var addr = new CHS( 5, 20, 8 )
// Properties:
var c = addr.cylinder
var h = addr.head
var s = addr.sector
// Convert to an LBA (Logical Block Address)
var lba = addr.toLBA( headsPerTrack, sectorsPerTrack )
var lba = addr.toLBA( 12, 32 )
// Set it to an LBA
addr.setLBA( lba, headsPerTrack, sectorsPerTrack )
addr.setLBA( 3150, 16, 63 )
// Get it as a buffer
var buf = addr.buffer
var buf = addr.toBuffer()
// Set from buffer
addr.buffer = new Buffer([ 0xFE, 0xFF, 0xFF ])
addr.parse( new Buffer([ 0xFE, 0xFF, 0xFF ]) )
Kind: global class
Number
Number
Number
Buffer
CHS
Number
Number
CHS
CHS
CHS
Buffer
Buffer
CHS
Number
Cylinder-Head-Sector Address
Params
Number
| Buffer
= 1023
Number
= 254
Number
= 63
Number
Cylinder
Kind: instance property of CHS
Number
Head
Kind: instance property of CHS
Number
Sector
Kind: instance property of CHS
Buffer
Get/set values from/to a Buffer
Kind: instance property of CHS
CHS
Set CHS to a Logical Block Address (LBA)
Kind: instance method of CHS
Params
Number
- Logical Block AddressNumber
- Heads per TrackNumber
- Sectors per TrackNumber
Get the Logical Block Address (LBA) corresponding to the given disk geometry
Kind: instance method of CHS
Returns: Number
- lba
Params
Number
- Heads per TrackNumber
- Sectors per TrackNumber
Kind: instance method of CHS
Returns: Number
- lba
See: #getLBA()
Params
Number
- Heads per TrackNumber
- Sectors per TrackCHS
Clone the CHS Address
Kind: instance method of CHS
CHS
Copy this address to a target address
Kind: instance method of CHS
Params
CHS
CHS
Parse a given Buffer
Kind: instance method of CHS
Params
Buffer
Number
= 0
Buffer
Write the CHS address to a given buffer
Kind: instance method of CHS
Params
Buffer
Number
= 0
Buffer
Create a Buffer representation of the CHS Address
Kind: instance method of CHS
CHS
Set the CHS address from its 24bit integer value
Kind: instance method of CHS
Params
Number
Number
Get the 24bit integer value of the CHS address
Kind: instance method of CHS
CHS
Create a CHS Address from a given buffer
Kind: static method of CHS
Params
Buffer
Number
= 0
CHS
Create a CHS Address from a Logical Block Address (LBA)
Kind: static method of CHS
Params
Number
- Logical Block AddressNumber
- Heads per TrackNumber
- Sectors per TrackFAQs
Cylinder-Head-Sector Address (CHS)
The npm package chs receives a total of 6,920 weekly downloads. As such, chs popularity was classified as popular.
We found that chs 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.