
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
js-inline-wat
Advanced tools
A tool for bundling a WebAssembly .wat file into a .js ES6 library file.
npm install -D js-inline-wat
$ inlinewat sample.wat [-o sample.wat.js] [-t decoded]
In package.json
scripts: {
"inlinewat": "inlinewat wat/sample.wat -o build/sample.js"
}
--input file The .wat file to inline
-o, --output file The .js file to create
-t, --type typeName The type of JavaScript file to generate - "decoded" (default), "encoded", "fetch"
-h, --help Show this Help page
Each type outputs a different variant of JavaScript file
Creates a JavaScript file with a default export function that can be used anywhere you could use fetch()
. e.g.
import fetchSample from 'sample'; // sample.js contains the bundled .wat
WebAssembly.instantiateStreaming(fetchSample)
.then(obj => obj.instance.exports.exported_func());
Creates a JavaScript file with a default export byte array containing the decoded .wat content
Note: You'll probably want to use WebAssembly.instantiateStreaming()
in most cases, as it is more efficient than instantiate()
.
import decodedSample from 'sample'; // sample.js contains the bundled .wat
WebAssembly.instantiate(decodedSample)
.then(obj => obj.instance.exports.exported_func());
Creates a JavaScript file with a default export string value containing the base64 encoded .wat file
import encodedSample from 'sample'; // sample.js contains the bundled .wat
// Decode the base64 string then compile...
FAQs
A tool for bundling a WebAssembly .wat file into a .js library file.
We found that js-inline-wat 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.