Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/corentindeboisset/styledconsole
💅⚡️🖥
Make your GUI tools user-friendly with methods to pretty-print text, lists, tables, user prompts, progress bars...
This project is heavily inspired on the awesome php helper SymfonyStyle from SensioLabs.
Simply run:
go get github.com/corentindeboisset/styledconsole
See the full usage documentation here.
Any text can be augmented with style, by enclosing the text with tags like this:
<fg=blue>Blue foreground text</fg=blue>
It is possible to imbricate the tags like this:
<fg=blue>Text with blue foreground, <bg=red>text with blue foreground and red background</bg=red>, text with blue foreground again</fg=blue>
If you want to, you can use the </>
shorthand to close the last opened tag. The previous text thus becomes:
<fg=blue>Text with blue foreground, <bg=red>text with blue foreground and red background</>, text with blue foreground again</>
One can set multiple properties in a single tag, by separating them with ;
:
<fg=blue;bg=red>text with blue fg and red bg</>
The available properties are the following:
fg=color
: sets the foreground color (value must be in the set below).bg=color
: sets the background color (the value must be in the set below).href=http://link/to/resource
: adds a hypertext link to the given location.options=opt1,opt2,opt3
: Adds additionnal text decorations. Available options are bold
, underscore
, blink
, reverse
and conceal
.The available colors are the standard ANSI set:
If you want to open an MR, be sure to run the tests with:
golangci-lint run
go test ./...
If you want to run all these tests automatically before every commit, add the custom git-hooks with:
git config core.hooksPath .githooks
FAQs
Unknown package
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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.