
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.
A Tool to decode numeric character reference(NCR).
numeric character reference(NCR) is similar to HTML Entities. NCR consists of two parts. prefix: "&#" or "&#x", body: Unicode code point. We offten see it in html, xml or even in dfm file(Delphi Form File).
there are some NCR string below:
宋体
中国
#23435#20307 (NRC in dfm)
.dfm file;npm install --save ncr-decode
use the cli
npm install -g ncr-decode
see from npm package.
const ncrd = require('ncr-decode')
console.log(ncrd.encode('宋体')) // 宋体
console.log(ncrd.encode('宋体', 16)) // 宋体
console.log(ncrd.decode('宋体')) // 宋体
console.log(ncrd.decode('Tim, 你好')) // Tim, 你好
console.log(ncrd.dfmDecode('#23435#20307')) // 宋体
console.log(ncrd.dfmDecode('宋体')) // 宋体
PS C:\Users\limoer\www\dfmdecode> ncrd
enter `.exit` to exit.
> 宋体
宋体
> #23435#20307
宋体
> Tom, 你好
Tom, 你好
> 123
[!invalid] 123
Usage: ncrd [options] [<input string>]
-i, --inline
inline mode, convert the input string
<input string>
NCR string or NCR string in dfm, if type the wrong type, just return.
/**
* numerric character reference(NCR) decode
* @param {string} str ncr string
* @return {string}
*/
function ncrDecode(str) {...}
/**
* NCR in dfm to NCR string
* @param {string} str
* @return {string}
*/
// [!Deprecated]use ncrEncode instead
// function str2NCR(str) {...}
/**
* string to NCR string
* @param {string} str
* @param {number} radix [10 || 16] default: 10
* @returns {string} NRC string
*/
function ncrEncode(str, radix = 10){...}
/**
* decode ncr in dfm
* @param {string} str
* @return {string}
*/
function dfmDecode(str) {...}
ncrEncode convert string to NCR string.ncrd --inline '#23435#20307'. Don't forget the quotes!FAQs
A Tool to decode numeric character reference(NCR)
The npm package ncr-decode receives a total of 36 weekly downloads. As such, ncr-decode popularity was classified as not popular.
We found that ncr-decode 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.