
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
hiddencoder
Advanced tools
Encode ASCII strings into zero-width unicode characters, and decode back into ASCII
Encode ASCII strings into zero-width unicode characters (hiddencoded), and decode back into ASCII
A simple encode-decode tool. Got the idea from @FakeUnicode's tweet, and the great breakdown on Stefan Judis' blog post.
This tool takes an ASCII string and encodes it into zero-width unicode characters, which won't show up when printing the unescaped string (a hiddencoded string). A decode operation is also available.
const {a2h, h2a} = require('hiddencoder');
const hiddenString = a2h("Hidden string");
console.log(`Hidden: ${hiddenString}`);
console.log(`Actual: ${h2a(hiddenString)}`);
// Output:
// Hidden: 󠅈󠅩󠅤󠅤󠅥󠅮󠄠󠅳󠅴󠅲󠅩󠅮󠅧 <- It's right here, the empty character
// Actual: Hidden string
Use the example files to encode a file in order to hide its content:
Encode the code in encode.js
file by using it on itself
node encode.js encode.js
This will save the encoded output into encode.js.enc
, and will seem empty
Decode the content back into readable form by using decode.js
node decode.js encode.js.enc
This will save the decoded output into encode.js.enc.dec
FAQs
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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.