
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@esjayeff/calculator
Advanced tools
In windows run (windows R) type cmd for (command line)
check node installation node - v if not installed download it from the nodejs website (https://nodejs.org/en/) and install it as per your Operating System.
check for typescript installation tsc -v
Error if not typescript not installed 'tsc' is not recognized as an internal or external command, operable program or batch file.
if not then run the following command npm i --g typescript (-- means if the older version is installed it will overwrite it) or npm i -g typescript (-- means if the older version is installed it will overwrite it) or npm install --g typescript (-- means if the older version is installed it will overwrite it) or npm install -g typescript (-- means if the older version is installed it will overwrite it)
All are the same commands will do the same job
check for VScode installation code
if you want to open any folder of windows in the cmd then type cmd in the address bar of the explorer while in that folder the command prompt will be open with that address. In my case it is D:\Panaverse Training\TypeScript\practise\calculator
now initializing the tsconfig.json file
in command prompt pass the command
tsc --init
the command line will show the following details
Created a new tsconfig.json with:
target: es2016
module: commonjs
strict: true
esModuleInterop: true
skipLibCheck: true
forceConsistentCasingInFileNames: true
You can learn more at https://aka.ms/tsconfig
now initializing the node package manager
npm init -y
the command line will show the following details
Wrote to D:\Panaverse Training\TypeScript\practise\calculator\package.json:
{ "name": "calculator", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "keywords": [], "author": "", "license": "ISC" }
now goto tsconfig.json
and ammend the following
please note that the target and module are uncommented
from "target": "es2016" to "target": "ES2022" change number 1
from "module": "commonjs" to "module": "NodeNext" change number 2
please note that the target and module are commented first uncomment the
"moduleResolution": "node"
and then change it
from "moduleResolution": "node" to "moduleResolution": "NodeNext"
and save the file
now in package.json make the following changes.
add the new line after "main": "index.js",
"type": "module",
Now add types of the nodes in the project from the command line.
npm i @types/node -D (developer dependency added in the project due to -D) npm i @types/inquirer -D (developer dependency added in the project due to -D) npm i @types/chalk -D (developer dependency added in the project due to -D) npm i @types/chalk-animation -D (developer dependency added in the project due to -D)
check package.json
"devDependencies": { "@types/chalk": "^2.2.0", "@types/chalk-animation": "^1.6.1", "@types/inquirer": "^9.0.3", "@types/node": "^18.11.9" }
Now add inquirer package in the project from the command line.
npm i inquirer npm i chalk npm i chalk-animation
check package.json
"dependencies": { "chalk": "^5.1.2", "chalk-animation": "^2.0.3", "inquirer": "^9.1.4" }
Now create .gitignore on the main stream where all the files are lying telling git and mention the packages which are not meant to be uploaded on the github.
if accidently deleted the node_modules file then just npm -i in the cmd line will install it again.
tsc && node index.js
one line compile and run the project."# CLI-Calculator" "# CLI-Calculator"
FAQs
In windows run (windows R) type cmd for (command line)
The npm package @esjayeff/calculator receives a total of 0 weekly downloads. As such, @esjayeff/calculator popularity was classified as not popular.
We found that @esjayeff/calculator 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.