
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
hex-frame-parser
Advanced tools
Encode & decode hexadecimal frames with ease
$ npm install --save hex-frame-parser
const Decoder = require('hex-frame-parser').Decoder;
const DecoderProperty = require('hex-frame-parser').DecoderProperty;
// Objects
const decoder = new Decoder('47c85d800f03'); // the hexadecimal frame to decode
// Define the syntax (bitStartPos, bitEndPos, key, type, unit, add, subtract, divide, multiply)
decoder.decoderProperties.push(new DecoderProperty(0, 32, false, 'pressure', 'float', 'hPa', null, null, 100, null));
// See the result
console.log(decoder.decode());
bitStartPos: Number defines the position of the starting bit to decodebitEndPos: Number defines the position of the ending bit to decodeisSigned: Boolean defines if the data is signed or unsignedkey: String defines the name of the data to decodetype: String defines the type of the data to decode (see below for usable types)unit: String defines the unit of the data to decodeadd: Number defines the number to add to the datasubtract: Number defines the number to subtract to the datamultiply: Number defines the number to multiply to the datadivide: Number defines the number to divide to the datatype can be:
charshortintlongfloatboolconst Decoder = require('hex-frame-parser').Decoder;
const DecoderProperty = require('hex-frame-parser').DecoderProperty;
// #1
const decoder_1 = new Decoder('47c85d800f03');
decoder_1.decoderProperties.push(new DecoderProperty(0, 32, false, 'pressure', 'float', 'hPa', null, null, null, 100));
decoder_1.decoderProperties.push(new DecoderProperty(8, 16, false, 'humidity', 'int', '%'));
console.log(decoder_1.decode());
// #2
const decoder_2 = new Decoder('b6096249');
decoder_2.decoderProperties.push(new DecoderProperty(8, 13, false, 'mode', 'bool', ''));
console.log(decoder_2.decode());
// #3
const decoder_3 = new Decoder('1a00bd4aa5181d');
decoder_3.decoderProperties.push(new DecoderProperty(8, 24, true, 'temperature', 'int', '°C', null, null, null, 8));
decoder_3.decoderProperties.push(new DecoderProperty(24, 32, false, 'humidity', 'int', '%', null, null, null, 2));
console.log(decoder_3.decode());
// #4
const decoder_4 = new Decoder('32b641e0224484');
decoder_4.decoderProperties.push(new DecoderProperty(4, 13, true, 'temperature', 'int', '°C', null, null, 0.25, null));
console.log(decoder_4.decode());
FAQs
Encode & decode hexadecimal frames with ease
We found that hex-frame-parser 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.