Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
ethereum-console
Advanced tools
Commandline console for Ethereum nodes.
ethconsole
connects to an Ethereum node running in the background (tested with eth and geth) via IPC
and provides an interactive javascript console containing the web3
object with admin additions.
Note that the admin additions are not yet official and may change any time.
# npm install -g ethereum-console
npm http GET https://registry.npmjs.org/ethereum-console
npm http 304 https://registry.npmjs.org/ethereum-console
npm http GET https://registry.npmjs.org/web3
...
# ethconsole
Connecting to node at /home/user/.ethereum/geth.ipc
Connection successful.
Current block number: 1083107
Entering interactive mode.
> web3.admin.getNodeInfo(function(err, info) { console.log(info.name); } )
eth/v1.2.0-2192c209/Debug-Linux/clang/int
ethconsole provides access to the cpp-ethereum test interface, which can be used to test smart contracts that depend on timing and blocks being mined.
# Install the development version of cpp-ethereum on Ubuntu:
# sudo add-apt-repository -y ppa:ethereum/ethereum-qt
# sudo add-apt-repository -y ppa:ethereum/ethereum
# sudo add-apt-repository -y ppa:ethereum/ethereum-dev
# sudo apt-get -y update
# sudo apt-get -y install eth
#
# Start eth in test-mode using data directory /tmp/test
$ eth --test -d /tmp/test &
# Wait for it to start up...
# Run the example:
$ ethconsole /tmp/test/geth.ipc example.js
These testing interfaces exist in cpp-ethereum:
web3.test.setChainParams({}, cb(err, bool))
set chain parameters using the json chain description
you can use the function chainParams in utils.js to create such a description
web3.test.mineBlocks(x, cb(err, bool))
start mining and stop again after exactly x blocks
web3.test.modifyTimestamp(x, cb(err, bool))
set the timestamp of the current block to x
web3.test.rewindToBlock(x, cb(err, bool))
rewind the blockchain to block number x
web3.test.addBlock(x, cb(err, bool)
inject an RLP-encoded block
FAQs
Commandline console for Ethereum nodes
The npm package ethereum-console receives a total of 1 weekly downloads. As such, ethereum-console popularity was classified as not popular.
We found that ethereum-console demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.